Skip to main content

Full text of "Micro 6502 Journal Issue 54"

See other formats


Oir 




! IDMA! 



* 



iifiw 




if 



Games Feature 




icWiiNdott/ll 




MaUeS PaPERWOrU PANdEIVIONilJIVI VANish 



MAGIC WINDOW II turns your APPLE in- 
to a sophisticated word processor. But 
because MAGIC WINDOW II operates so 
much like a standard typewriter, it's ex- 
tremely simple to use. In fact, because of 
its unique menu structure, it's the easiest 
to learn, and function selection is virtually 
error free. 

MAGIC WINDOW ll's powerful word pro- 
cessing features include automatic format- 
ting, editing, centering, and justification - 
and these are all done easily "on the video 
'' :en" before you ever print. Just type 
your first draft quickly, then go back and 
make any needed corrections. You can in- 
sert or delete letters or words, even move 
whole paragraphs with just a few simple 
keystrokes. 

And MAGIC WINDOW II can support 40-, 
70-, and 80-column displays, as well as 
automatically providing 80-column visibility 
with scrolling. The rule is; What you see on 
the screen is what you get in print. No word 
processor on the market has both the 
features of MAGIC WINDOW II and its 
simplicity of use. 



And as an extra assurance that your 
document is perfect before printing and 
mailing, you can use MAGIC WORDS. 
With incredible speed, MAGIC WORDS 
proofreads your document for spelling er- 
rors and typos, shows you each one in con- 
text on the screen, and allows you to cor- 
rect or ignore each in sequence. Unlike any 
other spelling checker, it will then auto- 
matically create a corrected file as you go 
so you never need to return to MAGIC WIN- 
DOW II to update it yourself manually. Or. 
if you're busy. MAGIC WORDS will go 
through your file without waiting for you to 
act on each error, and provide you with a 
printout of the errors and their locations so 
you can correct them at your convenience. 

And with a 14,000-word basic dictionary 
and plenty of memory for you to add 
technical terms or customer names that 
you use frequently. MAGIC WORDS be- 



SIIRuwlJl|fHI| 



can catch all your spelling errors and typos. 

But now comes the mailing, the really 
time-consuming part — unless you have 
MAGIC MAILER. A mailing list merge 



system, MAGIC MAILER lets you insert 
each name and address (or whatever is in 
your records) into your document quickly 
and efficiently. 

With MAGIC MAILER, you never have to 
retype a document or an internal address. 
With just a few keystrokes, each letter 
becomes an original, and the final phase 
of the paperwork process ts complete - 
efficiently and to perfection. 

Let's face it: The letters, invoices, and 
other documents you send out represent 
you to the public. They should be as pro- 
fessional as possible — and they can be. 
All it takes is a little MAGIC 

Each program is available separately or 
ask your local software store for Artsci's 
MAGIC PAK. All tfiree productsare included 
in an attractive library box. 



z i J ,- 9 a & 



srlsci. 



2MHZ 6809 SYSTEMS 

GIMIX offers you a variety to choose from! 
38 MB WINCHESTER SYSTEM $17,498.99 




DMA Double Density Floppy Disk Controller 
Dual 8" DSDD Floppy Disk Systenn 
Dual Winchester Subsystenn with 
Two19 MB 5V4" Winchester Drives 

OS-9 Text Editor 
OS-9 Assembler 



HARDWARE FEATURES: 

• 2MHz 6809 CPU • 

• 512KB Static RAM • 

• 8 RS232C Serial Ports • 

• 2 Parallel Ports 
SOFTWARE FEATURES: 

• OS-9 LEVEL TWO Multi-User • 
Operating Systenn • 

• OS-9 Debugger 

19 MB WINCHESTER SYSTEM $8998.09 

HARDWARE FEATURES: 

• 128K Static Rann • 

• 2MHz 6809 CPU • 

• 19 MB 51/4" Winchester DMA Subsystem • 
SOFTWARE FEATURES: 

• OS-9 LEVEL TWO Multi-User • 
Operating System • 

• OS-9 Text Editor 

128KB MULTI-USER SYSTEM $6997.39 

HARDWARE FEATURES: 

• 2MHz 6809 CPU • 2 RS232C Serial Ports 

• DMA Double Density Floppy Disk Controller • Dual 8" DSDD Floppy Disk System 

• 128KB Static Ram 

SOFTWARE FEATURES: Your choice of either UniFLEX or OS-9 LEVEL TWO. Both are Unix-like 
Multi-User/Multi-Tasking Operating Systems. 

56KB FLEX/OS-9 "SWITCHING" SYSTEM $4148.49 

HARDWARE FEATURES: 

• 2MHz 6809 CPU • DMA Double Density Floppy Disk Controller 

• 56K Static Ram • 2 Built-in SVa" 40tr DSDD Disk Drives 

• 2 RS232C Serial Ports (80 Track DSDD Drive Option . . add $400.00) 
SOFTWARE FEATURES: 

• GMXBUG monitor — FLEX Disk Operating System 

• OS-9 LEVEL ONE Multi-tasking operating system for up to 56K of memory 



4 RS232C Serial Ports 

1 MB 51/4" Floppy Disk Drive 

DMA Double Density Floppy Disk Controller 

OS-9 Debugger 
OS-9 Assembler 



WINCHESTER SUBSYSTEMS 



Winchester packages are available for upgrading current GIMIX 6809 systems equipped with DMA controllers, at least one 
floppy disk drive, and running FLEX, OS-9 LEVEL ONE or OS-9 LEVEL TWO. The packages include one or two 19MB (unformat- 
ted) Winchester drives, DMA Hard Disk Interface, and the appropriate software drivers. The Interface can handle two 5V4" 
Winchester Drives, providing Automatic Data Error Detection and Correction: up to 22 bit burst error detection and 1 1 bit burst 
error correction. 

Dual drives can be used together to provide over 30 MBytes of on line storage - or use one for back-up of the other. (More 
convenient and reliable than tape backup systems. 

#90 includes one 19MB Drive, Interface, and Software $4288.90 

#91 includes two 19MB Drives, Interface, and Software $6688.91 

Contact GIMIX for systems customized to your needs or for more information. 
50 HZ Export Versions Available 



GIMIX Inc. reserves the right to change pricing and product 
specifications at any time without further notice. 

GiMiX® and GHOST® are registered trademarl<s of GIMIX Inc. 

FLEX and UniFLEX are trademarks of Technical Systems Consultants Inc. 

OS-9 is a trademark of Microware inc. 



1337 WEST 37th PLACE 

CHICAGO, ILLINOIS 60609 

(312)927-5510 

TWX 910-221-4055 



Gimix 



inc. 



1982 GIMIX Inc. 



THE SKILLS YOU^^^M^^ 
TO MASTER YOUR MICRO 

IN A FRIENDUr, SEU^PACED FORNIAI^ 
FROMWILEY 



BASIC FOR THE APPLE II® 

Jerald R. Brown, LeRoy Finkel, & Bob Albrecht 
A complete, friendly, and virtually guaranteed in- 
troduction to BASIC programming on the Apple 
11®— from fundamental principles, assignment 
statements, and stored programs to such ad- 
vanced techniques as string variables and func- 
tions, subscripted variables, subroutines, and 
more. 

(1-86596-6) October 1982 
416 pp. $12.95 

ATARI® SOUND AND GRAPHICS 

Herb Moore, Judy Lower, & Bob Albrecht 
Learn how to compose and play melodies, draw 
cartoons, create games, and combine animation 
and sound— even if you have no previous comput- 
ing experience. 
(1-09593-1) 1982 234 pp. $9.95 

TRS-80™ COLOR BASIC 

Bob Albrecht 

Packed with games, experiments, and program- 
ming problems and solutions, this manual lets you 
explore all the applications of the TRS-80™ Color 
Computer, while it teaches you the fundamentals 
of BASIC programming. 
(1-09644-X) 1982 374 pp. $9.95 



6502 ASSEMBLY UNGUAGE PROGRAMMING 

Judi N. Fernandez, Donna N. Tabler, & Ruth Ashley 
Puts the speed and efficiency of assembly lan- 
guage programming within reach of owners of 
APPLES®, ATARI s®. Commodores, or any of the 
popular microcomputers based on the 6502 mi- 
croprocessor chip. 
(1-86120-0) October 1982 
approx. 256 pp. $12.95 

GOLDEN DEUCIOUS GAMES FOR THE 
APPLE® COMPUTER 

Howard M. Franklin, JoAnne Koltnow, 
& LeRoy Finkel 

This delightful guide shows novice and experi- 
enced programmers how to use the color, sound, 
and graphic capabilities of the Apple II® to create 
their own computer games. 
(1-09083-2) 1982 150 pp. $12.95 

More than a million people have learned to pro- 
gram, use, and enjoy microcomputers with Wiley 
Self-Teaching Guides. Look for them all at your 
favorite bookshop or computer store. 

f^. JOHN WILEY & SONS, Inc. 
i8o7(\^i982 605 Third Avenue 

■ha^- i^ew York, N.Y. 10158 
In Canada: 22 Worcester Road, Rexdale, Ontario M9W 1L1 




Apple* and Apple W" are registered trademarks of Apple Computer Inc 
Atari* is a registered trademarl< of Atari, inc. 
TRS-80TM is a trademari< of Tandy Corp. 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 




November Highlights 

Games Featuie 

This month we expand a bit from our usual content and of- 
fer an array of games for a wide variety of computers. 
Although we don't usually publish games, we feel that 
they may be valuable, particularly where they demon- 
strate techniques or cultivate a skill in the user. Instead of 
making games a regular part of MICRO, we prefer to do it 
all at once! 

There are specific games for nearly every computer, in- 
cluding the PET, VIC, Apple, ClP/Superboard, Atari 400/ 
800, and the SYM..In addition, you will find that most can 
be converted easily to run on even more machines. These 
represent a variety of types of games too — from action 
games like "Space Invasion" and "Shootdown," to 
strategy games like "Number Shuffle, " "GOMOKU," and 
"23 Matches," to "Castle Adventure." 

Written in the style of Scott Adams' famous games, 
"Castle Adventure" (p. 41) tests your memory and 
analytical skills. You will find yourself in the evil baron's 
castle in a quest for treasure and the kidnapped princess. 
"Castle Adventure" was originally written for the PET. 
We have provided specific line changes to make it run on 
the Apple. However, except for disk commands, it is writ- 
ten in straight Microsoft BASIC, so owners of OSI, Atari 
(with Microsoft BASIC), and Color Computer (with ex- 
tended BASIC) machines should be able to easily adapt 
"Castle Adventure." 

"Solve the Pagoda Puzzle Using Recursive Assembly" 
(p. 53) is particularly interesting because it demonstrates a 
technique — having a subroutine call itself — that you 
may want to apply to your own programs. The author's ap- 
plication is in solving the "Pagoda" or "Tower of Hanoi" 
puzzle. The program solves the puzzle for a stack of disks 
of any practical height and outputs a list of specific moves. 
With a minimum of changes, it will run on any 6502 com- 
puter. You may want to try incorporating this routine into 
a BASIC program that actually shows the disks being moved 
from peg to peg. 

"GOMOKU" (p. 59) is a fast, machine-language ver- 
sion of the oriental game of strategy. It is presented here 
for VIC, with modifications for PET. "Number Shuffle" is 
an Atari computer version of "Magic Square," the game 
where you slide the little numbered squares around until 
you get them in order. "Space Invasion," for the CIP/ 
Superboard and "Shootdown" are arcade-style action 
games. Finally, "23 Matches' ' is a short machine-language 
game for the SYM. It makes ingenious use of the SYM's 
LCD display. 

This month's editorial (p. 7) offers some thoughts on 
games and their place in MICRO and in our society. 

68000 Coverage Continues 

Preliminary results from our survey indicate that a lot 
of you are interested in the 68000. As part of our continu- 
ing effort to keep you informed on this powerful new pro- 



cessor, we present two articles this month on the 68000. 
Dr. Hootman's detailed discussion of the 68000 instruc- 
tion set continues (p. 27] with the binary arithmetic opera- 
tions. Handy reference tables are included. Jelemensky 
and Whiteside (p. 13) conclude their demonstration of 
68000 programming techniques. 

We haven't seen any games yet for the 68000. Is it 
because its users haven't gotten over the speed and power? 
Or is it because these machines aren't finding their way in- 
to very many homes? 

Atari Coverage Takes Off 

With the addition of Contributing Editor Paul Swanson 
to our staff, MICRO'S Atari coverage has improved con- 
siderably. Paul's column, a new "From Here to Atari" (p. 
103), starts this month. In addition, he continues his 
character graphics article series with a discussion of fine 
scrolling [p. 82). This month's data sheet (p. 109 — com- 
piled by Paul Swanson) is a handy reference for serious 
Atari programmers. 

Atari users will be interested in programming extra col- 
ors, even in the limited high-resolution modes. Richard 
and Donna Marmon (p. 96) illustrate two techniques — 
one that uses adjacent color dots, and one that quickly 
alternates displays. 

Hardware 

In keeping with our lighter theme in this issue, the 
hardware articles we present are simple, single-evening 
projects. All involve modifications of existing equipment. 
Ralph Teimy (p. 19) shows how to get a high-quality pic- 
ture from your color computer using a monitor instead of a 
TV. A monitor requires a composite video signal, not 
available on the CC, and the author shows you how to add 
it. Jim Strasma (p. 35) shows how to take Commodore's 
cheapest model PET and convert it into a machine with 
80-column business capabilities, yet with all the graphic 
characters still available from the keyboard. OSI owners 
can now use Atari's inexpensive joysticks with their 
machines. Joseph Ennis (p. 9) shows how to make the sim- 
ple changes in your computer board. 

Graphics for the Apple 

For those interested in improving their game and graphic 
programming skills, our graphics articles for Atari and Ap- 
ple will help. Apple programmers will learn about 3-D ro- 
tation from Chris Williams (p. 99) . If you have done much 
graphics programming on the Apple, you have probably 
been annoyed by the unfortunate location of the graphics 
pages. Authors Bems (p. 93) and Weston (p. 79) present a 
number of techniques to circumvent this problem. 

New Color Computer Column Expands 
6809 Coverage 

John Steiner's new monthly column "CoCo Bits" 
covers the 6809-based TRS-80 Color Computer (p. 38). 
This month he discusses some problems associated with 
transferring cassette programs to disk and presents a short 
program to move the game "BEDLAM." Also for the 
Color Computer owner, Ron Anderson discusses FLEX09 
(p. 23) as it is implemented by Frank Hogg Laboratories. 
FLEX is a imiversal operating system that opens up a wide 
range of software for the 6800 and 6809 to the Color Com- 
puter owner. ilMCftO 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



Emulates these terminals exactl y. 



IBM 3101 

DEC VT100, VT52 

Data General 0200 

ADDS flagent 20, 25, 40 

Hazeltlne 1400, 1410, 1500 

LearSieglerADM-3A,AOM-5 

TeleVideo 910 

Teletype Model 33 KSR 



Apple is a trademaitt of 
Apple Computer, inc. 



BREAK 

CATALOG 

CHAIN 

CONFIGURE 

CONNECT 

CONVERSE 

DIAL 

END 

HANGUP 

LOG 

MONITOR 

NOLOG 

ONERR 

PAUSE 

PROMPT 

RECEIVE 

REMARK 

RETRIES 

SEND 

SPECIAL 

SPEED 

TIMEOUT 

XMIT:WAIT 




Supports these 
interface txjards. 



Your host com 
won't know the differcncci 

Softerm provides an exact terminal emulation 
for a wide range of CRT terminals which interface 
to a variety of host computer systems. Special 
function keys, sophisticated editing features, 
even local printer capabilities of the terminals 
emulated l}y Softerm are fully supported. Softerm 
operates with even the most discriminating host 
computer applications including video editors. 
And at speeds up to 9600 baud using either a 
direct connection or any standard communi- 
cations modem. 

Unmatched file transfer capability 

Softerm offers file transfer methods flexible 
enough to match any host computer requirement. 
These include character protocol with user- 
definable terminator and acl<nowledge strings, 
block size, and character echo wait, and the 
intelligent Softrans"* protocol which provides 
reliable error-free transmission and reception of 
data. The character protocol provides maximum 
flexibility for text file transfers. Any type file 
may be transferred using the Softrans protocol 
which provides automatic binary encoding and 
decoding, block checking with error recovery, and 
data compression to enhance line utilization. 
A FORTRAN 77 source program is supplied with 
Softerm which is easily adaptable to any host 




computer to altowi _ 

with Softerm using the Softrans pro 

Softerm file transfer utilizes an easy to use 
commandlanguage which allows simple defini- 
tion of even complex multiple-file transfers with 
handshaking. Twenty-three high-level commands 
include DM/., CATALOG, SEND. RECEIVE, 
ONERR, HANGUP, MONITOR and others which 
may be executed in immediate command mode 
interactively or from a file transfer macro com- 
mand file which has been previously enters 
and saved on disk. 

Built-in utilities 

Softerm disk utilities allow DOS commands such 
as CATALOG, INIT RENAME, and DELETE to be 
executed allowing convenient file maintenance. 
Local file transfers allow files to be displayed, 
printed, or even copied to another file without 
exiting the Softerm program. Numerous editing 
options such as tab expansion and space com- 
pression are provided to allow easy reformatting 
of data to accommodate the variations in data 
formats used by host computers. Softerm sup- 
ports automatic dialing In both terminal and file 
transfer modes. Dial utilities allow a phone book 
of frequently used numbers to be defined which 
are accessed by a user-assignable name and 



Apple ComiDunjcatliHis Card 

Apple Parallel Printer 

Apple Serial Interface 

Apple Super Serial Card 

Bit 3 Dual-Comm Plus™ 

CCS 7710, 7720, 7728 

Hayes Mlcromodeni I 

Smartmodem'* 300, & 1200 

Intra Computer PSIO 

Novation Apple-Cat ir 300 & 1200 

Orange Micro Grappler™ 

SSM ASIO, APIO, AlO, AlO ir 

Tpofts your 80-column hardware 

ALS Smarterm™ 

Bit 3 Full-view 80" 

Computer Stop Omnlvision™ 

M&R Sup'R'Terminar 

STB Systems STB-80™ 

VIdex Vldooterm™ 

Vista Computer Vision 80"" 

Wtosper Micro Wizard 80" 

specify the serial interface parameters 
to be used. 



Online Update Service 

The Softronics Online Update Service is pro- 
vided as an additional support sen/ice at no 
additional cost to Softenn users. Its purpose 
is to allow fast turnaround of Softerm program 
fixes for user-repoited problems using the 
automatic patch facility included in Softerm 
as well as a convenient distribution method for 
additional terminal emulations and I/O drivers 
which become available. User corresixndence 
can be electronically mailed to Softronics, and 
user-confr/Metf keyboard macros, file transfer 
macros, and host adaptations of the Softrans 
FORTRAN 77 program are available on-line. 

Most advanced communications 
software available 

Just check Softerm's 300 page user manual. 
You simply can't buy a more sophisticated 
package or one that's easier to use. Available 
now for only $150 from your local dealer or 
Softronics, Inc. 

SOFTRONICS 

6626 Prince Edward, iVIemphis, Tl^ 38119. 901755-5006 



NO. 54 



NOVEMBER 1982 



STAFF 

President/Editor-in-Chief 
ROBERT M. TRIPP 

Publisher 

MARY GRACE SMITH 

Editorial Staff 

PHIL DALEY — Technical editor 
JOHN HEDDERMAN — Jr. programmer 
MARJORIE MORSE — Editor 
JOAN WITHAM — Editorial assistant 
LOREN WRIGHT — Technical editor 

Graphics Department 

HELEN BETZ — Director 

PAULA M. KRAMER — Production mgr. 

EMMALYN H. BENTLEY — Typesetter 

Sales and Marketing 
CATHI BLAND — Advertising mgr. 
CAROL A. STARK — Circulation mgr. 
LINDA HENSDILL — Dealer sales 
MAUREEN DUBE — Promotion 

Accounting Department 
DONNA M. TRIPP — Comptroller 
KAY COLLINS — Bookkeeper 
EILEEN ENOS — Bookkeeper 



Contributing Editors 
DAVE MALMBERG 
JOHN STEINER 
JIM STRASMA 
PAUL SWANSON 
RICHARD VILE 



Advertising Sales Representatives 
See Page 127 



Subscription/Dealer inquiries 
(617)256-5515 



DEPARTMENTS 


3 


November Highlights 


7 


Editorial 


38 


CoCo Bits 


50 


New Publications 


63 


Letters/Updates 


75 


PET Vet 


86 


APPLE Slices 


88 


Reviews in Brief 


103 


From Here to ATARI 


105 


6809 Bibliography 


106 


Software Catalog 


108 


Hardware Catalog 


109 


Data Sheet 


111 


Advertiser's Index 


112 


Next Month in MICRO 




THE 6502/6809 JOURNAL 

GAMES FEATURE 

41 Castle Adventure for PET and APPLE David Maimberg 

49 SYM 23 Matches Matt Ganis 

CO Solve the Pagoda Puzzle Using 

^^ Recursive Assembly Sherwood Hoyt 

59 VIC/PET GOMOKU David Maimberg 

62 NumberShuffleon the ATARI Frank Roberts 

66 Sensible Use of APPLE Game Paddles Harry l Pruetz 

70 Space Invasion for OS! C1P/Superboard Johns. Seyboid 

72 APPLE ShoOtdOWn Eric Grammer 

HARDWARE 

Q ATARI Joysticks on the OS! Joseph Ennls 

^ A simple modification including software and programming information 

HO An IVIC68000 Overview, Part 2. . . .JoeJelemenskyand Tom Whiteside 

' ^ Simple examples illustrate 68000 programming techniques 

H q A Monitor for the TRS-80 Color Computer Ralph Tenny 

' ^ Instructions to get composite video from the video section of the CC 

oo FLEX and the TRS-80 Color Computer Ronald w. Anderson 

^^ A description of FLEX09 

py 68000 Binary Arithmetic Operations JoeHootman 

^ • A discussion of binary arithmetic instructions 

qc How to Make a Graphic-80 PET from a 4016 Jim strasma 

^^ Just add inexpensive ICs and move jumpers 

GRAPHICS 

70 APPLE Hi-Res Graphics and Memory Use Dan weston 

' ^ Avoid overwriting the graphic display area 

op ATARI Character Graphics from BASIC, Part 2 PauiSwanson 

^^ Learn about fine scrolling 

qq Getting Around the APPLE Hi-Res Graphics Page Eagle i. Bems 

^^ utilize the graphics area without sacrificing memory 

qo Extra Colors for the ATARI Richard l. and Donna Marmon 

^O Xvvo techniques to expand your computer's palette 

qq Introduction to 3-D Rotation on the APPLE chris wmiams 

^^ Learn the techniques for yaw, pitch, and roll 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 




EXPANSION 




Tired of trying to run your word processor or your DMB on an 
OSI 64 ctiaracter video screen? Now there's the SEB-3, THE 
most versatile 80x24 video board anywhere is available for OSI 
48 pin BUSS systems. No longer will you have to consider con- 
verting your video-based system to a serial terminal because 
you've found 64 characters stifling for serious business use. 
Nor need you give up compatibility with any existing graphics 
software because the SEB-3 allows you to choose ANY screen 
format up to 80x24 including 32x32 and 64x32. Since the 
SEB-3's screen format can be changed at any time under soft- 
ware control, even gaming displays can benefit from screens 
custom tailored to the game itself. The SEB-3 is so 
well designed and so versatile that it will not need 
to be replaced — ever. Simple changes in software and/or 
hardware will allow the SEB-3 to: generate displays up to 256 



columns; handle 50 Hz European formats; accomodate custom 
characters or character cell sizes larger or smaller than 8x8 
and transparently access the screen to eliminate screen 
"glitches". In short, the SEB-3 will meet any demands your 
system may place on it now and in the future. The SEB-3 also 
supports an OSI-style floppy disk interface which can handle 
two 5" or 8" drives. Like all of the boards in the SEB series, 
the SEB-3 simply "plugs in" to your machine — there are 
absolutely NO hardware changes. The SEB-3 is designed to 
replace your outmoded 540 board so you don't even lose a 
backplane slot. Your keyboard input now also plugs into 
the SEB-3 — load one of the software drivers and you're 
ready to go! 
SEB-3 Assembled $259.00 Bare Board $59.00 

Kit $220.00 Manual only $5.00 




If your Challenger can't generate displays like those shown 
above WHAT ARE YOU WAITING FOR? The SEB-1 High 
Resolution Graphics and ivlemory Board (for CI P and 
Superboard II) and the SEB-2 High Resolution Graphics and 
Disk Controller Board (for C2/4/8) simply 'plug-in' to your 
computer and give you instant access to over 49000 
individually addressable pixels in up to 8 colors! Your Hi-Res 
screen can go from 32 x 16 alphanumerics to 256 x 192 point 
graphics in 1 1 software selectable modes. The standard video 
of your computer is left intact, so that none of your current 
software library is outmoded. Use the graphics for Business, 
Scientific, Education, or Gaming displays that were impossible 
— until now! SEB-1 SEB-2 



Installation of either board requires absolutely NO rnodification of 
your computer — they just 'plug-in'. Nor do they preclude your 
using any other OSI-compatible hardware or software. In addition 
to the Hi-Res Graphics the SEB-1 gives CI & Superboard II users 
1 6K of additional user memory (over and above that memory 
devoted to the graphics), two 16 bit timers/counters, an on-board 
RF modulator, and a parallel port with handshaking. The SEB-2 
gives OSI 48-pin BUS users an OSI hardware/software 
compatible Disk controller, and an RF modulator that can be 
user-populated. 

FOR OSI IP, 2-4P, 2-8P, C4P, C8P 



SEB-1 



SEB-2 



Assembled and Tested 
Kit 



$249.00 (5K RAM) $239.00 (1K RAM) 
$165.00 (No HAM) $199.00 (No ^M) 



COMING: SEB-3 80x24 VIdeolDlak Controller (C2l4/a), SEB-4 4BK Memory 
RAMIROM (C2l4la), SEB-S 8K RAMIDIaklSoundlClooklVolce (CI i Superboard). 



Write for FREE catalog 

International Requests please 

supply 2 International Response Coupons 



ORION 



Bare Board & Manual 
Manual only 


$ 59.00 
$ 5.00 


$ 59.00 
$ 5.00 


A 




VfSA' 

-762-5636 


j 

'^SOFTWARE ASSOC. 


^^ 


P.O. BOX 310, OSSINING, NY 1056 


2 914 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



About the Cover 




Our biave knight, Godfrey de Good- 
heart, boldly chases dragons through 
Baron Von Evil's castle in search of the 
fair Princess Fatima. MICRO features 
"Castle Adventure'* by David Maimberg 
(page 41]. It is written for PET, Apple, 
and other Microsoft BASIC computers. 

The photo, by Kenneth Witham, is of 
Schloss Anif in Salzburg, Austria. The 
knight and dragon graphics were drawn 
on the Apple Graphics Tablet. 



/MCftO 



iMCAO is published monthly by 




MICRO INK, Chelmsford, MA 01824 | 


Second Class postage paid at: 




Chelmsford, lAA 01814 and additional | 


mailing offices 




USPS Publication Number: 483470 




ISSN: 0271-9002 




Send subscriptions, change of address, USPS 


Form 3579, requests for back issues and all 


other fulfillment questions to 




MICRO INK 




34 Chelmsford Street 




P.O. Box 6502 




Chelmsford, MA 01814 




or call 




617/256-5515 




Telex: 955329 TLX SRVC 




800-227-1617 




Subsciiption Rates 


Pel Year 


U.S. 


$24.00 


2yr. 


/ $42.00 


Foreign surface mail 


$27.00 


Ail mail: 




Europe 


$42.00 


Mexico, Central America, 




Middle East, North Africa, 




Central Africa 


$48.00 


South America, South Africa, 




Far East, Australasia, 




New Zealand 


$72.00 


Copyright© 1982 by MICRO INK 




All Rights Reserved 





Editorial 



Responsible Gamesmanship 

MICRO does not publish games. We've 
run editorials explaining why — out- 
lining the weaknesses, drawbacks, and 
worthlessness of many computer 
games. The computer was not devel- 
oped to fill arcades or to force squeals of 
delight or anguish from mesmerized 
users who've spent hours killing the 
same aliens over and over again. 

So why have we not only added 
games in this issue, but FEATURED 
them? We aren't giving in; we still 
believe many games are a waste of 
time. But we also believe that games — 
when written and presented properly — 
can educate. In fact, they can act as an 
effective tool at all educational levels. 

For example, there are games that 
simulate business environments, 
games that demand logical thought, 
games that teach us how to program, 
how to spell, or to calculate math- 
ematical equations. The variations of 
these games that are most successful 
actively involve the student/partici- 
pant in problem solving and decision 
making. They are not just drills to 
enable us to push the right button at 
the right time or to give the right 
answer; they are lessons in learning — 
they can expand our understanding of 
both artificial and human intelligence. 

You see, it's the games that just pit 
one person against the computer in a 
mindless battle of eye-hand coordina- 
tion that irritate us the most. [Does an 
image of your neighborhood's favorite 
arcade leap to mind?) Maybe these 
florescent, noisy battlegroimds provide 
entertainment for those who need to let 
off a little steam; but to have energetic, 
lively, questioning children and adoles- 
cents glued to machines in meaningless 
combat for hours on end is scary. 

Whose responsibility is it (yours, 
ours, the schools, the manufacturers) 
to offer at least enough of the really 
worthwhile stuff to balance off what's 
already so, unfortunately, popular? 



Judah Schwartz, Professor of Engi- 
neering Science and Education at MIT, 
summed up the software situation in a 
recent issue of Classioom Computei 
News. Although his comments were 
directed specifically toward educa- 
tional material, they can be as easily 
applied to games in general: "My hope 
is that the publishers of this country — 
who control the curriculum far more 
than they even begin to realize — will 
stop doing what they are now doing and 
start to provide materials for computers 
which are more open-ended, which are 
more tool-like in nature, which will 
help children to assume a more active 
role, which will not trivialize the 
nature of education, and which will 
work to make schools more nearly the 
collaborative community of learners 
that they should be." 

Computers are efficient, friendly, 
and generally expensive. As with every- 
thing else, we want them to be used to 
their full potential. One way is through 
well-written, mind-boggling, educa- 
tional games. So, MICRO would like to 
promote the use of these types of 
games. We encourage manufacturers to 
continue to produce quality products 
that get the most out of the computer 
and the participant. We encourage pub- 
lishers of books and magazines to sup- 
port the use of stimulating games that 
require both the use of skill and the 
growth of skills. 

We hope you enjoy the games we 
present in this issue, but also hope you 
will learn some new techniques and 
some good methods for writing your 
own games. We hope you will give 
some thought to the social impact of 
computer games, as well. 





No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



&iT 



cMVV?ifc2Vlagic,. 



MACHINE LANGUAGE SPEED 
WHERE IT COUNTS... 

IN YOUR PROGRAM! 



^ 



For the first time, AmperMagic makes it easy for people who don't Jrnoiv 
machine language to use its power! Now you can attach slick, finished machine 
language routines to your Applesoft programs In seconds! And Interface them 
by name, not by address! 

You simply give each routine a name of your choice, perform the append pro- 
cedure once at about 15 seconds per routine, and the machine language becomes a 
permanent part of your BASIC program. (Of course, you can remove it if you want to.) 

Up to 255 relocatable machine language routines can be attached to a BASIC 
program and then called by name. We supply some 20 routines on this disk. More 
can be entered from magazines. And more library disks are in the works. 

These routines and more can be attached and accessed easily. For example, 
to allow the typing of commas and colons in a response (not normally allowed in 
Applesoft), you just attach the Input Anything routine and put this line in your program: 

XXX PRINT "PLEASE ENTER THE DATE."; : & INPUT,DATE$ 



&-MAGIC makes it Easy to be Fast & Flexible! 

PRICE: $75 



&-Magic and Amper-Magic are trademarks of Ajiihro- Digital, Inc. 
Applesoft is a trademark of Apple Computer, Inc. 



Some routines on this disk are: 

Binary file info 
Delete array 
Disassemble memory 
Dump variables 
Find substring 
Get 2-byte values 
Gosub to variable 
Goto to variable 
Hex memory dump 
Input anything 
Move memory 
Multiple poke decimal 
Multiple poke hex 
Print v\//ov\/ord break 
Restore special data 
Speed up Applesoft 
Speed restore 
Store 2-byte values 
Sv\/ap variables 

Anthro - Digital Software 

P.O. Box 1385 

Pittsfield, MA 01202 

The People - Computers Connection 



^iaaHssB*^ 



ACE 100 
13199500 

ACE100 64K 2 RANA DRIVES 
12" NEC GREEN SCREEN MONITOR 



VOICE SYNTHESIZER FOR AIM/SYM/KIM WITH SPEAKER 
AIM 65, 4K, COMPLETE WITH MANUALS 



■ 6502P. 1 MHZ $ 5.95 

6512P, 1 MHZ 5.95 

6520P, PIA 4.45 

6522P. VIA 6.45 

6532P, RIOT 7.95 

6545-1 P, CRT 19.95 

6551 P, UART 8.95 

6592P, PRINT CTRL 26.80 

: 6847P, VDG 15.60 



NEW FULLY GUARANTEED PARTS 

21 14, lKx4, 450NS S 2 25 

61 16, 2Kx8, CMOS 7 50 

41 16. 16Kxl, DYNAMIC 195 

4164, 64Kx1, DYNAMIC 10.95 

2716,2Kx8 3.95 

2532, 4Kx8 8.50 

4N33, OPTO-COUPLEH 2.95 

VOLTRAX SC-0 1 A 69.00 



$139.00 

$469.00 


555 TIMER 
XR2206 . 
XR221 1 
DM8131. 
RED L.E.D-, 
IN4004 
IN914 . 
N4148 


Tl i/> 


HI 


eff! 


$39 

495 

4 95 

3 45 

15 

09 

04 

04 


8 POSITION DIP SWITCH ... 


4.95 



PHONE ORDERS WELCOME - FREE CATALOG - HOURS 9 A.M. TO 5 P.M. CST 



CASHIERS CHECK or MONEY ORDER 

PERSONNEL CHECKS, 2 WEEKS WITH D.L.# 

IVIC or VISA, IvIUST HAVE CARD NO. 

SHIPPED VIA U.P.S. or 1st CLASS MAIL 

C.O.D. ACCEPTED, ADD S5.00 

MAIL ORDER ONLY 



WS4* 



master charge 



ADD SI. 75 FOR U.P.S. 

ADD $2.75 for 1 st CLASS MAIL 

; ADD ADDITIONAL $5.00 FOR C.O.D. 

Il ADD ADDITIONAL $3.75 FOR OUT OF U.S. 

TEXAS RESIDENTS ADD 5% SALES TAX 

PRICES GOOD THROUGH DECEMBER 31, 1982 



BEDFORD MICRO SYSTEMS 81 7 - 283-001 3 

P.O. BOX 1182 BEDFORD, TEXAS 76021 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Installing Atari Joysticks 
on the OSI 



by Joseph Ennis 



A simple, non-destructive 
modification to the OSI C1 P or 
Superboard is described. This 
allows the use of Inexpensive 
Atari joysticks. Demonstration 
software and programming 
Information are also Included. 



Joystick 

requires: 

C1P 

Hardware components 

One or two Atari joysticks 



Installing Atari joysticks on the OSI 
600 board-based computers (Super- 
board or CIP) is easy. It takes $9.95 per 
joystick and five minutes. 

Sears is a good source for Atari 
joysticks; they stock them under two 
catalog numbers — 6K99835 for a 
single joystick or T3K7687 for a pair. 
You'll pay $19.95 for two. In addition 
you will need one 12-pin male Molex 
connector. You may purchase one from 
your OSI dealer for $1.00, or from 
Technical Products Co., Box 12983, 
University Station, Gainsville, FL 
32604 (Molex coimectors are $4.95 for 
four pair of male and female) . 

My 600 board came without J4 
mounted, but it took me about one 
minute to push a coimector into the 
holes in the printed wiring board and 
solder the twelve pins to the board. 

When you get the joysticks, cut the 
Atari cables as close to the coimector as 
possible, and strip enough of each wire 
to connect to a male Molex connector 
[about 1/8 inch). I used a drill press 
vise to hold the Molex connector and 
an X2 magnifying glass to aid in solder- 
ing. I also used the trick of wrapping 
several turns of number 18 buss wire 
around the tip of my 15-watt pencil 
iron to give me a fine soldering point. 

Solder the wires of both joysticks (if 
you plan to use two) to the single male 



Molex connector according to the fol 


lowing table: 




Molex 




Pin Joystick 1 


Joystick 2 


1 - 


Black 


2 Black 

3 - 

4 — 


— 





5 Green 


Green 


6 Blue 


Blue 


7 Brown 


Brown 


8 White 


White 


9 Orange 


Orange 


10 - 


— 


11 — 


— 


12 - 


— 



For those interested in how this 
modification works, figure 1 shows the 
schematic of the 600 board keyboard 
area with the joysticks connected to 
connector J4. 

Testing is also easy. First do the 
usual inspection for poor workman- 
ship, solder bridges, etc. Then plug the 



joystick connector into [4, the connec- 
tor in the lower left comer or closest to 
the keyboard (see photograph). Plug in 
the joystick connector so that pin 1, the 
one with a black wire on it, is toward 
the back of the 600 board (away from 
the keyboard). Bring up power and, 
without touching the joystick, check to 
see that the keyboard works as before. 
Now pick up joystick 1, the one with 
its black wire connected to pin 2. Move 
the controls on the joystick and note 
that characters are printed to the 
monitor screen according to the follow- 
ing table. Pick up joystick 2 and per- 
form the same test. Any problem is 
most likely a soldering problem. 





Joystick 1 


Joystick 2 


Fire 


Q 


1 


Up 


A 


2 


Right 


Z 


3 


Down 


Space 


4 


Left 


/ 


5 



Don't worry about Up-Right or Up- 



Figure 1: Keyboard/Joystick Schematic 




No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



Right-While-Filing. These combina- 
tions are there, but right now they 
decode to non-printable symbols and 
don't show on the monitor screen. 

This completes installation and 
testing. The rest of the joystick opera- 
tion is software. At the time of this 
writing OSI had not yet come out with 
any joystick programs for the 600 board 
computers, so there had not been any 
standardization of the joystick move/ 
decode tables. Much joystick software 
for the OSI is sold by Aardvark Techni- 
cal Services, 2352 South Commerce, 
Walled Lake, MI 48088. Aardvark uses 
a slightly different method of connec- 
ting joysticks and a different decode. 
There are advantages and disadvan- 
tages. Aardvark' s Mod is longer and re- 
quires cutting some traces on the 600 
board. However, they have a lot of good 
software already developed according 
to their convention. Fortvmately, the 
difference is not great. Joystick 2 in this 
mod has the same decode as joystick 1 
in the Aardvark mod. Therefore, all 
one-player games need no changes. 
Aardvark's joystick 2 is connected so 
that it decodes to: Fire = 8 Up = 9 
Right = Down=: and Left = -. For 
two-player Aardvark games the code 
must be changed. 

When writing software for joy- 
sticks, the following line must appear 
early in the program; 

POKE 530,1 :REM TURNS OFF KEY- 
BOARD SCAN, POKE 530,0 WILL TURN 
KEYBOARD SCAN ON AGAIN 

Later in the program, when joystick 
1 is to be polled, program: 

POKE 57088,128: P = PEEK(57088) 

and when joystick 2 is to be polled, 
program: 

POKE 57088,2: P = PEEK(57088) 

Table 1 gives all the possible values for 
variable P. 

A joystick demo program has been 
included at the end of this article. This 
demo illustrates most of the techniques 
for animated graphics and their use 
with joysticks. 

This program, when running, will 
display two tank symbols. Each tank 
symbol will be controlled by one 
joystick. A study of listing 1 will illus- 
trate the programming techniques re- 
quired by programs using joystick in- 
puts. It is not necessary to have a joy- 
stick decode table with all seventeen of 
the entries given in table 1, since 
FIRING is merely the position values, 
less 127. Therefore, note that in line 70 
FIRE is set equal to 128 and in line 1000 
P is checked to see that it is less than 
FIRE. If it is, then the program jumps to 
the FIRE subroutine at 2000. The last 



Listing 1 



REM««*««««««*«***««« 

1 REM JOYSTICK »♦ 

2 REM DOODLER ♦» 

3 REM »» 

4 REM bv ♦♦ 

5 REM Joseph Ennis ♦* 
A REM ♦» 

7 REM A- DEMO of JOY-»» 

8 REMSTICK TECHNIQUES* 

9 REM»»*»»*»»-»-»-»»*»»»* 

10 REM JOYSTICK ONE IS SET AT 1=FIRE» 2=UP. 

11 REM JOYSTICK TWO IS SET AT Q=FIRE. A=UPr 

12 REM YOU HILL NOTE SOME INTERACTION PROBLEMS WITH BOTH FIRE BOTTONS 

13 REM SET TO COLUMN 7 THIS CAN BE FIXED BY SETTING FIRE ON 

14 REM JOYSTICK TWO TO FIRE=; AND MAKING A FEW CHANGES IN FIRE SUBROUT 

15 DIM K(8) . M(3) > S(8) 
20 X=0: U=0 
30 FOR X=l TO 8: 
40 FOR X=l TO 8! 
50 FOR X=l TO 8! 



3=D0WNi 4=LEFT 

Z=RIGHTi SPACE=DOWNi /=LEF 



READ K(X) : 
READ MIX) I 
READ S(X) : 



«: 2110 



NEXT: REM LOADS KEY DECODE TABLE 
NEXT: REM LOADS MOVE TABLE 
NEXT: REM LOADS SYMBOL TABLE 
40 A=53480i B=540Al: REM TANK A4B START LOCATIONS 

70 AA = 2! BB = 128! N00P = 254: FIRE=128: C = .57088: SHELL = 46: BLANK = 32 

71 REM FIRE REALLY EQUALS 127 BUT SETTING TO 128 SAVES AT 100 

74 FOR X=l TO 32: PRINT: NEXT 

75 INPUT"SELECT SPEED <1 = FAST 2!J0 = SLOW) "! DELAY 
90 FOR X=l TO 32: PRINT: NEXT: REM SLOW SCREEN CLEAR 
100 POKE 5301 l: REM TURN OFF AUTOMATIC KEYBOARD SCAN 
110 POKE AjS(4): POKE B.S(8) : REM INITIALIZE TANK LOCATIONS 
120 POKE CfAA: P=PEEK(C): IF P<NOOP THEN F=2: GOTO 1000 
130 POKE CfBB! P=PEEK(C): IF P<NO0P THEN F=3: GOTO 1000 
140 GOTO 120: REM LOOP WAITS FOR JOYSTICK MOVEMENT 
200 DATA 190. 158. 222. 204. 233. 230. 244. 182 
210 DATA -32. -31. +01. +33, +32. +31. -01. 
220 DATA 248. 249. 250. 251. 252. 253. 254. 
990 REM MOVEMENT SUBROUTINE STARTS ON 1000 
1000 IF P<FIRE THEN GOSUB 2000 
1005 IF P'NOOP THEN GOTO1050 
1010 FOR X=l TO 8 

1020 IF K(X)=P THEN MOVE=M(X): SYMBOL=S(X): 
1025 NEXT X 

1030 IF F=2 THEN POKE A. BLANK: A=A+MOVE! POKEA . SYMBOL : REM CLASSIC MOV 

1040 IF F=3 THEN POKE B, BLANK: B=B+MOVE! POKE B. SYMBOL: REM MOVE B 

1045 FOR X=l TO DELAY: 2=2: NEXT X 

1050 ON F GOTO 1000.130.120: REM LOOPS BACK TO JOYSTICK DET LINES 

1990 REM FIRE DECODE SUBROUTINE STARTS ON 2000 

2000 REM FIRE DECODE SUBROUTINE 

2005 IF F=2 THEN SYMBOL=PEEK < A ) : L=A: REM GUN NEEDS TO KNOW WAY TANK F 

2010 IF F=3 THEN SYMBOL=PEEK (B) ! L=B: REM WAY TANK B FACES 

2020 FOR X=l TO 8 

2030 IF S(X)='SYMBOL THEN W = X: L = L+M(W): X=8 

2035 NEXT X 

2040 FOR U=l TO 10*RND<X): REM MOVE SHELL. JUST EFFECTS NO ATTEMPT TO 

2050 POKE L. SHELL: V=l: POKE L. BLANK: L=L+M(H) 

2040 NEXT U 

2070 FOR U=l TO 10 

2080 POKE L.INT(100*RND(X) ) : REM A LITTLE EXPLOSION AT END OF SHELL FL 

2090 NEXT U 

2100 POKE L. BLANK: REM CLEANS UP LAST OF EXPLOSION 

2110 P=P+FIRE 

2120 RETURN 



-33 
255 



X=8: REM SETS UP FOR MOVE 



line in the FIRE subroutine adds 127 
back to P, taking out the effect of FIRE 
before turning control over to the 
MOVE loop. This halves the time of 
the loop and the size of the joystick 
decode table, as only eight values are 
needed for two joysticks. This still 
allows the players to move while firing. 
There is one disadvantage with the 
technique used in this joystick mod. 
When two players are playing and both 
players are moving their joysticks at 
the same time, there are combinations 
where there can be feedback through 
the joystick switches. With the key- 
board polling routine that OSI uses, one 
data line at a time is set on the LS75 
latches, U2 andUS (see figure 1). When 



one latch (these are inverting latches) is 
set it pulls down the line to one of the 
rows of keys on the keyboard. If any 
key in that row is pushed, its position 
will be read by the LSI 25 bus drivers. 
This is why a PEEK to the keyboard ad- 
dress will return the value of 255 (all 
ones) when no keys are pushed. When 
only one of the LS75 latch stages is 
energized, then only one row is set for 
decode. 

Pushing a key in any other row will 
not produce any output on the data bus . 
This is why selecting one joystick to 
row 1 and the other to row 7 will allow 
one joystick to be decoded indepen- 
dently of the other, even though they 
are connected to the same columns. 



10 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Table 1 






Joystick 


Value 


Movement 


Position 


ofP 


Value 


Not FIRING 




Current 


and: 




Position plus 


Up 


190 


-32 


Up/Right 


158 


-31 


Right 


222 


+ 01 


Down/ Right 


206 


+ 33 


Down 


238 


+ 32 


Down/ Left 


230 


+ 31 


Left 


246 


-01 


Left/Up 


182 


-33 


FIRING and; 






No movement 


127 


+ 00 


Up 


063 


-32 


Up/Right 


031 


-31 


Right 


095 


+ 01 


Down/Right 


,079 


+ 33 


Down 


111 


+ 32 


Down/ Left 


103 


+ 31 


Left 


119 


-01 


Left/Up 


055 


-33 



When the computer wants to check joy- 
stick 1 for movement, a 128 is POKEd 
into the keyboard address (polling must 
be suppressed at this time by the POKE 
530,1 having already been executed) 
and only a key closure in row 1 will 



produce an output on the data bus. It is 
connected to the only low latch; all the 
rest are high. As long as 128 has been 
POKEd to the keyboard address, only a 
movement of joystick 1 can be read. If 
joystick 1 is not being moved, then no 
movement of joystick 2 will produce 
any output on the data bus. The same 
thing happens when the computer 
wants to read joystick 2; a 2 is POKEd 
to the keyboard address, which allows 
only the keys in row 7 to be active. No 
other keys will produce any output on 
the data bus. The only problem occurs 
when both joysticks are being moved at 
the same time. The worse case is when 
one is moving and firing and the other 
is only firing. The low set by the latch 
will feed through the two fire switches 
and be read as a movement by the bus 
driver when only a fire was intended. 
This can really destroy a game. Putting 
another isolating diode in any of the 
joystick lines doesn't help, as the 
LS125's are too sensitive. They see the 
forward voltage drop of the two diodes 
in series (one of the diodes Dl through 
D8 with any additional isolating 
diode), which causes the LSI 25 to 
always stay high. No key closures are 
detected. A pull-down resistor to a 
negative supply in conjunction with 



the isolating diode would be a solution. 
Another solution is a hearing aid 
battery in series with the joystick's 
isolating diode. Or you could just give 
up the option of moving while firing. I 
use a software solution which, while 
not perfect, has yet to produce any ob- 
jectional performance in any of the 
games I am running. Move the orange 
wire on joystick 1 from pin 9 to pin 4 
and make the following software 
changes: define a new variable in demo 
program line 70 like FO = 251, and 
rewrite line 1000 as 1000 IF FIRE < P 
OR (P AND FO) THEN GOSUB 2000. 
This way the FIRE push buttons are 
connected to separate columns and 
can't feed back through each other's 
switches. Movements are now only 
slightly affected. If one joystick is do- 
ing Up/Right and the other is doing Up, 
then both will do Up/Right. But if one 
is doing Up/Right and the other is 
doing Up/Left or anything besides pure 
Up, then both will move their separate 
ways. In an actual game, this fix is 
sufficient. 



You may contact Mr. Ennls at 212 20 St., 
Niceville, FL 32578. 



IMCftO 



OSI 



CIP 



Stankiewicz & Robinson, 

authors of MINOS, NIGHT RIDER, etc., 

proudly present to you: 

34 original PROGRAMS on tape all for the unbelievably low price of $29.95!! 

That's less than $1 each! 





PINBALL 

ARCADE TYPE 

NIGHT RIDER* 

COSMIC DEBRIS* 

MINOS* 

STREET SWEEPERS 

RIDGE CRUISER 

CAGE* 

PINBALL 

OSI GRAND* 

MINE FIELD 

WORM 

DEPTH CHARGE 

GOTCHA! 



MINOS (MAZE) 

STRATEGY 

TAKE FOUR 

MIMIC 

MANCALA 

NEIGHBORS 

BAR 

LIFE FOR TWO* 

KALEIDOSCOPIC 

LIVING PATTERNS 
KALEIDOSCOPE 
DRAW ME 



All programs will run on 8k ClP. 
Many are compatible for C2/4 
and run in 4k. 





NIGHT RIDER 

UTILITIES 

TAPE VERIFIER 
LISTING LINE RE. it 
VERSATILE LINE RE. it 
LINE LOCATOR 

STATISTICS 

CHI SQUARE 
FUNCTION PLOTTER 
BETTER RND. it GEN. 
PROBABILITY //I 



RIDGE CRUISER 
MISCELLANEOUS 

MESSAGE ENCODER 
TYPING TUTOR 
PHONE NUMBER 
DEHYDRATION 
BLACK JACK DRILL 



(* Previously sold 
by AARDVARKTM ; 



3 ■ 




Please add $1.50 postage & handling 

PA resident please add 6% sales tax 

Charge customers include // and 

expiration date 

VICTORY SOFTWARE CORP. 

2027-A S.J. RUSSEL CIRCLE 

ELKINS PARK, PA 19117 

Sorry, no phone orders on this special deal 



No, 54 - November 1982 



MICRO - The 6502/6809 Journal 



11 




The 68000 

DREAM MACHINE 



WE (SORT OF) LIED: 

Motorola has been promoting its advanced microprocessor 
chip as a vehicle for large, complex systems exclusively. 
Now, the 68000 does work well as the heart of big, complex 
systems. But their promotional literature implies that one 
can only build big, complex systems with the 68000, and that 
is dead wrong (in our opinion). Nevertheless, the public 
(that's you!) perception of the 68000 follows Motorola's line: 
Big systems. Complex systems. 

Our boards are not complex and not necessarily big (starting 
at 4K). Our newsletter is subtitled "The Journal of Simple 
68000 Systems." But since the public has become condi- 
tioned to the 68000 as a vehicle for FORTRAN, UNIX, LISP, 
PASCAL and SMALLTALK people naturally expect all these 
with our $595 (starting price) simple attached processor. 
Wrong! 

We wrote our last ad to understate the software we have 
available because we wanted to get rid of all those guys who 
want to run (multi-user, multi-tasking) UNIX on their Apple II 
and two floppy disks. Running UNIX using two 143K floppies 
is, well, absurd. The utilities alone require more than 5 
megabytes of hard disk. 

HERE'S THE TRUTH: 

We do have some very useful 68000 utility programs. One of 
these will provide, in conjunction with a suitable BASIC com- 
piler such as PETSFEED (Pet/CBIvl) or TASC (Apple II), a five 
to twelve times speedup of your BASIC program. If you have 
read a serious compiler review, you will have learned that 
compilers cannot speed up floating point operations 
(especially transcendentals). Our board, and the utility soft- 
ware we provide, does speed up those operations. 

Add this line in front of an Applesoft program: 

5 PRINT CHR$(4);"BLOADUTIL4,A$8600":SYS38383 

That's all it takes to link our board into Applesoft (assuming 
you have Applesoft loaded into a 16K RAM card). Now run 
your program as is for faster number-crunching or compile it 
to add the benefit of faster "interpretation". Operation with 
the Pet/CBM is similar. 

68000 SOURCE CODE: 

For Apple II users only, we provide a nearly full disk of un- 
protected 68000 source code. To use it you will have to have 
DOS toolkit ($75) and ASSEM68K ($95), both available from 
third parties. Here's what you get: 

1) 68000 source code for our Microsoft compatible floating 
point package, including LOG, EXP, SQR, SIN, COS, TAN, 
ATN along with the basic four functions. The code is set up to 
work either linked into BASIC or with our developmental 
HALGOL language. 85 sectors. 



2) 68000 source code for the PROM monitor. 35 sectors. 

3) 68000 source code for a very high speed interactive 3-D 
graphics demo. 115 sectors. 

4) 68000 source code for the HALGOL threaded interpreter. 
Works with the 68000 floating point package. 56 sectors. 

5) 6502 source code for the utilities to link into the BASIC 
floating point routines and utility and debug code to link into 
the 68000 PROM monitor. 113 sectors. 

The above routines almost fill a standard Apple DOS 3.3 flop- 
py. We provide a second disk (very nearly filled) with various 
utility and demonstration programs. 

SWIFTUS MAXIMUS: 

Our last advertisement implied that we sold 8MHz boards to 
hackers and 12.5MHz boards to businesses. That was sort of 
true because when that ad was written the 12.5MHz 68000 
was a very expensive part (list $332 ea). Motorola has now 
dropped the price to $1 1 1 and we have adjusted our prices ac- 
cordingly. So now even hackers can afford a 12.5MHz 68000 
board. With, we remind you, absolutely zero wait states. 

'Swiftus maximus'? Do you know of any other 
microprocessor based product that can do a 32 bit add in 0.48 
microseconds? 

AN EDUCATIONAL BOARD? 

If you want to learn how to program the 68000 at the 
assembly language level there is no better way than to have 
one disk full of demonstration programs and another disk full 
of machine readable (and user-modifiable) 68000 source 
code. 

Those other 'educational boards' have 4MHz clock signals 
(even the one promoted as having a 6MHz CPU, honest!) so 
we'll call them slow learners. They do not come with any 
significant amount of demo or utility software. And they com- 
municate with the host computer via RS 232, 9600 baud max. 
That's IK byte/sec. Our board communicates over a parallel 
port with hardware AND software handshake, at 71 K 
bytes/sec! We'll call those other boards handicapped 
learners. 

Our board is definitely not for everyone. But some people find 
it very, very useful. Which group do you fit into? 

DIGITAL ACOUSTICS 

1415 E. McFadden, Ste. F 

Santa Ana, CA 92705 

(714) 835-4884 



Apple, Applesoft and Apple II are trademarks of Apple Computer Company. Pel is a trademark of Commodore Business Machines. - 



12 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



An MC68000 Overview, Part 2 



by Joe Jelemensky and Tom Whiteside 



This second part of the 68000 
overview provides simpie 
programming examples to 
illustrate programming 
techniques and special features 
of the MC68000. Part 1 appeared 
in MICRO (52:32). 



A Simple MC68000 Subroutine to 
Compare Two Strings 

As a first example of programming the 
MC68000, consider the string compari- 
son subroutine in figure 1 . This simple 
subroutine will return with the Zero 
flag set if the first string matches the 
second. We will use the convention that 
all strings must be terminated with a 
zero. Address registers "AO" and "Al" 
will be used as pointers to the begin- 
ning of the two strings to be compared. 

The subroutine documentation 
shows the calling sequence for 
STRCMP. In the subroutine usage doc- 
umentation, the string pointers are in- 
itialized using the "MOVEA" (MOVE 
Address) instructions. The ".L" suffix 
on the MOVEA instructions tells the 
assembler that a long address is to be 
moved. A ".W" suffix specifies a sign 
extended 16-bit word address. In the 
MC68000, whenever an instruction has 
two operands, the first operand is the 
source and the second is the destina- 
tion. For the first "MOVEA" instruc- 
tion, "FIRST"' is the absolute memory 
address to be used as a source for the 
long word to be moved to the destina- 
tion "AO". Naturally, we can use any 
of the other addressing modes to 
specify the string location instead of ab- 
solute if we choose to. 

After the string pointers are in- 
itialized, the user does a "JSR" (Jump 
to SubRoutine) to the string compare 
subroutine followed by a branch based 
on the Z flag. The "BEQ.S" is a branch 
if equal to zero (string match). The 
".S" suffix tells the assembler that the 
destination is within the range of an 
8-bit signed displacement. An " .L" suf- 
fix is used for 16-bit displacements. 



The STRCMP subroutine begins 
and ends with "MOVEM.L" instruc- 
tions to preserve all the registers that 
are used. The first "MOVEM" (MOVE 
Multiple) instruction moves the 32-bit 
contents of "AO" through "Al" and 
"DO" to the stack, which is pointed at 
by "A7" . The assembler syntax for the 
register list on a "MOVEM" instruc- 
tion can be in the form "A0/A1/A2/ 
A3/A4/A5/A6/A7/D0/D1/D2/D3/ 
D4/D5/D6/D7" or the shortened form 
"A0-A7/D0-D7". The "-(A7)" des- 



tination means to use the pre- 
decrement indirect addressing mode 
with the stack pointer "A7". This is 
equivalent to pushing the registers onto 
the system stack. The MC68000 
assembler automatically adjusts the 
number to decrement or increment 
based on the total size of the operation. 
The final "MOVEM" instruction does 
just the opposite and loads "AO" 
through "Al" and "DO" from the 
stack using the post-increment indirect 
addressing mode from "A7". This is 



Figure 1: MC68000 String Compare 



ROUTINE: 
PURPOSE: 

ASSUMPTIONS: 
EXAMPLES: 



USAGE: 



STRCMP — STRing CoMPare 

Compare two strings. If the first string matches the second 
string then return with the "Z" bit set. The user points AO at 
the start of the first string, and Al at the start of the second. 

Strings terminate in a zero. 

sample string: 



First string 

'cattle' 
'cat' 



'cattle' 
'cat' 

MOVEA. L FIRST.AO 
MOVEA. LSECOND,Al 
JSR STRCMP 

BEQ.S xxxx 



FCC 'this is a 
FCB 00 


string' 






Second string 




Zbit 




'cattle' 
'cattle' 
'any string' 
'cat' 
'fatcat' 




1 
1 
1 




match 

match 

match 

no match 

no match 



POINT AT FIRST STRING 
POINT AT SECOND STRING 
COMPARE THE STRINGS 
BRANCH IF MATCH IS FOUND 



STRCMP EQU • 

MOVEM.L AO-Al/DO, 



LOOP 



EQU • 

MOVE.B 

BEQ.S 



CMP.B 
BEQ.S 



(AO)+,DO 
QUIT 



DO,(Alj + 
LOOP 



■ (A7) PRESERVE ALL REGISTERS ON THE STACK 



GET THE NEXT CHARACTER IN THE 
FIRST STRING. IF AT THE END OF THE 
FIRST THEN IT MATCHES! 

DOES NEXT CHARACTER IN THE 
SECOND MATCH? IF IT MATCHES KEEP 
TRYING. OTHERWISE, FALL THROUGH 
WITH Z BIT = 0. 



QUIT 



EQU • 

MOVEM.L (A7)+, AO-Al/DO RESTORE THE REGISTERS 

RTS AND LEAVE. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



13 



equivalent to pulling the registers off 
the system stack. 

The actual string compare code is 
only four instructions long. The 
"MOVE.B" instruction moves the next 
character from the first string to "DO" 
and bumps the first string pointer to 
the next character. If we have reached 
the end of the first string then, by our 
convention that all strings end in zero, 
the Zero flag will be set and the short 
branch will be taken. (We found a 
match!) Otherwise, the "CMP.B" in- 
struction checks to see if the lower byte 
in the data register matches the next 
character in the second string and 
bumps the pointer to the next charac- 
ter. If the characters match, the routine 
loops back to "LOOP" and tries the 
next character. If they do not match 
(including the case where we reach the 
end of the second string) the code falls 
through with the Zero flag cleared. 

MC68000 Code for a Pascal Loop 

The next example illustrates use of 
the MC68000' s powerful DBcc looping 
instruction. DBcc is designed to speed 
up the "FOR", "WHILE", and "RE- 
PEAT UNTIL" loops used so frequently 
in high-level languages (HLL). The 
DBcc instruction has three parameters: 
a terminating condition, a data register, 
and a branch displacement. The in- 
struction first sees if the terminating 
condition has been met, and if so, the 
branch specified by the branch offset is 
not taken. If the terminating condition 
is not met, the specified data register is 
decremented. If the result of this decre- 
ment is not - 1 then the branch is 
taken. Otherwise, the branch falls 
through. The "cc" part of the instruc- 
tion can be any of the conditions shown 
in table 6 (see Part 1, MICRO 52:38). 

The following Pascal procedure and 
accompanying MC68000 code frag- 
ment illustrate how the DBcc instruc- 
tion works (figure 2). The "REPEAT 
UNTIL" loop will continue until "i" 
has counted down to - 1 or "CAT" 
equals "RAT". The MC68000 code 
uses "DO" for "i" and uses "DBEQ" 
to loop until "DO" = - 1 or the 
previous comparison sets the Z flag. 
The DBcc instruction takes no more 
time than a simple branch instruction 
when the branch is taken. The equi- 
valent code without the DBcc instruc- 
tion is obviously much longer. 

High-Level Language 
Procedure Calls 

It is becoming increasingly impor- 
tant for processors to be able to handle 
subroutines efficiently as programs be- 
come more modular. This is true both 



Figure 2: Example use of the DBcc (test condition Decrement and Branch) Instruction. 


PROCEDURE typical; 
CONST maxcnt = 10000; 




VAR i, cat, rat: integer; 
BEGIN 




i: = maxcnt; 
REPEAT 




i: = i- 1; 




UNTIL (i < 0) OR (cat = rat); 
END; { typical } 




MOVE #MAXCNT- 1,D0 
LOOP EQU * 


INITIALIZE LOOP COUNTER 


MOVE.W CAT,D1 
CMP.W RAT,D1 
DBEQ.S D0,LOOP 

+ 


GET CURRENT VALUE OF "CAT" 
SEE IF "CAT" IS EQUAL TO "RAT" 
DECREMENT "I" AND LOOP UNTIL "I" = 
- I OR "CAT" EQUALS "RAT" 


Figure 3: Example Pascal Procedure Call 


PROCEDURE dojunk(VAR a,b:INTEGERi c,d:INTEGER); 

VAR i,j,k:INTEGER; 

BEGIN 


END; 




• SET UP FOR PROCEDURE CALL 

* 




INIT POINTERS TO VARIABLE PARAMETERS 


PEA A 
PEA B 


PUSH POINTER TO VAiUABLE "A" 
PUSH POINTER TO VAiUABLE "B" 


MAKE COPY OF VALUE PARAMETERS ON THE STACK 

* 


MOVE.W C, -(A7] 
MOVE.W D, - (A7) 


PUSH COPY OF "C" 
PUSH COPY OF "D" 


• CALL PROCEDURE 

* 




ISR DOJUNK 

* 


CALL THE PROCEDURE 


* CLEAN UP STACK AFTER PROCEDURE AND RESTORE REGISTERS 


ADDQ #6,A7 


REMOVE PARAMETER LIST FROM STACK 


DOJUNK EQU • 

LINK A0,#-3 


MAKE ROOM ON STACK FOR LOCAL 
VARIABLES 


UNLK AO 
RTS 


CLEAR OFF STACK AND RESTORE AO 
BEFORE LEAVING 



14 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



at the assembly-language level and for 
implementing modem HLLs. Figure 3 
shows a typical Pascal procedure and 
how the procedure call might be im- 
plemented in MC68000 code. 

Procedure "dojunk" is a typical 
Pascal procedure with variable para- 
meters "a" and "b" and value para- 
meters "c" and "d". For those un- 
familiar with Pascal, a value parameter 
is a copy of a variable passed to a pro- 
cedure. This copy can be modified by 
the procedure but the changes are not 
passed back to the calling procedure 
when the procedure exits. Variable 
parameters, unlike value parameters 
are passed back to the calling procedure 
as pointers to the variables. Value 
parameters are copies of the variables. 
The MC68000 code for calling pro- 
cedure dojunk begins by initializing the 
stack with the procedure parameters. 
The two "PEA" instructions push the 
pointers to variables "A" and "B".The 
two "MOVE" instructions push copies 
of variables "C" and "D" on the stack. 
The procedure is then called with the 
JSR instruction.' When the procedure 
returns to the calling routine, the space 
made on the stack for the parameters is 
removed with the ADDQ instruction. 

When procedure dojunk (figure 4] is 



Figure 4: Stack Usage for Pascal Procedure Call Example 

"At [31. .167 



AO 



A7 



A-f [15..00] 
Bt[31..161 
_Bf [15..00[ 
"C[15..00r 
D[15..00] 
RTNLINK[31..161 
RTN LINK [15. .00] 
rA0[31..16] OLD 
|_A0[15..00] OLD 
I[15..00]' 
J[15..00| 
K[15..00] 



VARIABLE PARAMETER POINTERS 



. VALUE PARAMETERS 




POINTER TO LOCAL VARIABLES 



LOCAL VARIABLE STORAGE 



called, the LINK instruction provides a 
clean way to make room for local vari- 
ables ("i", "j", "k"). The LINK in- 
struction pushes the old value of "AO" 
on the stack, sets "AO" equal to the 
stack pointer, and subtracts the offset 
[in this case three words) from the 
stack pointer. With this technique, 



local variables are referenced with 
negative offsets off "AO" and 
parameters are referenced with positive 
offsets. This technique of using the 
stack supports re-entrant code and 
recursion with no problems. Before do- 
junk exits, it uses UNLK to clear off the 
local variable space it used. 



••••••••••••• •• •••••••••••••••• 






from 



+ POWER 
COMPUTECH 




Check the 
outstanding 
documenta- 
tion supplied 
with AIM65I 



Top quality power supply designed to Rocl<well's specs for fully 
populated AIM65 — includes overvoltage protection, transient sup- 
pression, metal case and power cable: 

PSSBC-A (5V 2A Reg: 24V .5A Avg, 2.5A Peak, Unreg) .... "64.95 
Same but an extra AMP at 5 volts to drive your extra boards: 
PSSBC-3 (5V 3A Reg: 24V .5A Avg, 2.5A Peak, Unreg) .... 74.95 
The professional's choice in microcomputers: 

AIM65/1K RAM '429.95 BASIC (2 ROMS) "59.95 

AIM65/4K RAM "464.95 ASSEMBLER (1 ROM) "32.95 

FORTH (2 ROMS) "59.95. 

SAVE EVEN MORE ON COMBINATIONS 

AIM65/1K + PSSBC-A... "479.95 AIM65/4K+PSSBC-3 ..."524.95 
We gladly quote on all AIM65/40 and RM65 items as well. 

ORDERS: (714) 369-1084 

P.O. Box 20054 • Riverside, CA 92516 

California residents add 6% sales tax 



3^- 

Ik- 

If 
Jf 
Jf 
Jf 
Jf 
Jf 
Jf 
Jf 
Jf 
Jf 
Jf 
Jf 
* 
Jf 
Jf 
Jf 

* 



••••••••*-••••• •••••••••••••••••• 



SeaFORTH for the Apple computer 

Is a consistent structured operating system providing the 
advanced programmer with the tool to easily develop 
programs from machine language to high level compiled 
applications. With SeaFORTH. the edit-compile-execute- 
edit cycle is measured in seconds, not minutes. 

The integrated SeaFORTH package includes: 

• Editor 

• Disc I/O 

• Assembler 

• Hi-res Graphics 

• Transcendental Floating Point 

• Command Line Input with Editing 

• Detailed 1 50 Page Technical Manual with 

Complete Source Listing! 
Implemented as a true incremental compiler, SeaFORTH 
generates machine code, not interpreted addre:is lists. 
SeaFORTH's direct-threaded-subroutine implementation 
executes faster than interpreted address-list versions. 

Apple SeaFORTH requires a 48K Apple ][ + , with DOS 
3.3. Manual and copyable disk are available for only 
SI 00.00 

Compatible SeaFORTH for the AIM requires a terminal 
and is only available in EPROMs. Manual and EPROMs 
SI 50.00 

Manuals available, separately, for only S30.00 

All prices include UPS shipping. 

VISA or MASTER CHARGE welcome. 

(Dealer Inquiries Welcome) 

TAU LAMBDA 

P.O. Box 808, Poulsbo, Washington 98370 
(206) 598-4863 



Apple J[ + and AIM are registered crademarks of 
Apple Computer and Rockwell 



NO. 54 - November 1982 



MICRO - The 6502/6809 Journal 



15 



Range Checking Using the 
MC68000 

The MC68000 "CHK" instruction 
provides an efficient mechanism to in- 
sure that array bounds are not exceeded 
in high-level language implementa- 
tions. As an example of range checking 
with CHK, consider the problem of en- 
forcing array boundary checking in a 
simple Pascal program. Figure 5 shows 
the stack usage for a simple variable 
declaration using the same scheme 
described in the "Procedure Call" ex- 
ample. The individual elements of the 
array "data" will be accessed by index- 
ing off the pointer "AO". The range 
checking's duty is to insure that we do 
not attempt to access an element of 
"data' ' before its true beginning or after 
element "MAX". The consequences of 
exceeding the array bounds range from 
inadvertently modifying another vari- 
able (such as "i", "]" , or "misc") to 
stepping on a subroutine return link! 
Figure 6 shows a simple Pascal state- 
ment to clear the "ith" element of 
"data" and the MC68000 code to ac- 
complish it with the necessary range 
check. The code assumes that register 
"DO" contains the current state of "i". 
The CHK instruction examines the 
lower word in the specified register 
("DO") and generates an error trap if it 
is less than or greater than "MAX". 
Otherwise, the code falls through to 
the MOVE instruction that clears the 
"ith" element of "data". 

Conclusion 

We hope this article has given you 
some insight into the extensive power 
of the MC68000. The 16-bit data bus, 
the 16 megabytes of directly address- 
able memory, the sixteen 32-bit user- 
accessible registers, the powerful in- 
struction set, numerous addressing 
modes, and fast execution speed are 
enough to really get folks excited. 

Future Growth 

The MC68000 is not the only 
member of this powerful microproces- 
sor family. Motorola is taking advan- 
tage of its modular, microprogrammed 
structure to develop other processors 
which are upward and downward com- 
patible to the MC68GGG. 

The MC68G08 is a machine and 
assembly level-compatible version of 
the MC68000 with an 8-bit data and 
20-bit address bus for low-cost systems 
that need the performance of the 
MC68000 and can tolerate a slight 
decrease in throughput for reduced 
system costs. 

With the MC68G1G, Motorola adds 
virtual machine capabilities to the 



Figure 5: Array Storage on the Stack for the Range Checking Example 



{ sample variable declaration 



Vari,j 
data 
misc. 



AO 



mtegei; 

array [0.. MAX] of integer; 

integer; 



_A0[31..16] OLD 
A0[15..00l OLD 



stuff before data array 
{ stuff after data array 



■ data|0] 
data|l] 



data[MAX] 



Displacement to "data" array 



Space for "data" array 



Stack area beyond the "data" array 



Figure 6: Example of Range Checking Using the IVIC68000 

{ Pascal statement to clear the "ith" element of "data" } 
data[i]: =0; { note: i < or i > MAX is a range error!!! } 



MC68000 CODE TO EXECUTE THE ABOVE STATEMENT 

ASSUME DO CONTAINS THE CURRENT CONTENTS OF "i" 
GENERATE A TRAP IF "i" < OR IF "i" > MAX 
CHK #MAX,DO 

HERE IF NO RANGE ERROR OCCURRED 
MOVE.W #0,DISP|AO,DO) CLEAR THE "iTH" ELEMENT OF DATA 



MC68GG0 architecture. 

A full 32-bit implementation (32-bit 
address and data buses) of the architec- 
ture with an enhanced instruction set 
and on-board cache is in design. The 
part will be designated the MC68G2G 
and will contain all of the additional 
feattires of the MC68G10. 

A full complement of peripherals 
for the MC68000 family have been in- 
troduced or are in development. These 
include a Direct Memory Access con- 
troller (MC68440), a Memory Manage- 
ment Unit (MC68451), a Floating Point 
Arithmetic Co-processor (MC68881), 



and several data communication parts. 
Because of this commitment to the 
continuation and e:[ihancement of the 
MC68GGG family, systems and soft- 
ware for the MC680GG are insured a 
long useful life. 

References 

1. "16-Bit Microprocessor User's 
Manual," Motorola Inc., 1982. 

2. "Motorola Resident Structured 
Assembler Manual," Motorola Inc., 
1982. 

JMCftO 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



FOUR TO GROW 



^ 




Four software packages, that is, to 
make your Apple® computer really 
grow! Versatility is the key to com- 
puting success, and with Advanced 
Operating Systems, it's as easy as 
one, two, three. 

APPLE-AIDS is a collection of 12 
Applesoft and machine language 
programs designed to bring you 
greater flexibility and control over 
your microcomputer 

In addition to several programs 
which allow you to examine and 
change various track/sector con- 
tents, format new disks, and create 
and edit EXEC files, APPLE-AIDS in- 
cludes two programs you can't af- 
ford to be without. UNDELETE FILES 
allows you to recover accidentally 
deleted files which you thought 
were lost forever. KILL DOS removes 
DOS from any disk freeing up more 
space for your programs or data. 

Russ Adams, a reviewer for INFO- 
WORLD, writes, "Its (APPLE-AIDS) 
documentation is the finest I have 
seen since joining the INFOWORLD 
Software Review Board." Ease of 
use and extensive documentation 
make APPLE-AIDS a valuable addi- 
tion to every Apple software library 
#26066, $49.95 



HELLO CENTRAL! changes your 
Apple II® or Apple II Plus® into a 
highly versatile communications 
center. 

Establish direct communications 
with other computers of any make 
or tap into the wealth of informa- 
tion available from the hundreds of 
public-base services like THE 
SOURCE. 

HELLO CENTRALI's most unique fea- 
ture is Its text buffer. Messages or 
entire files can be uploaded and 
downloaded into the text buffer 
which holds up to 18,000 characters. 
The buffer text can be scanned, 
changed, and then saved to disk. 

The best thing about HELLO CEN- 
TRAL! is that you don't have to be a 
professional to get professional re- 
sults. A few simple keystrokes will 
accomplish any of your text/com- 
munications tasks. #26081, $99.00 

MUSIC GAMES skillfully combines 
the sound and high resolution 
graphics of the popular Apple com- 
puter to provide both visual and 
audible reinforcement to the study 
of music. Twelve different pro- 
grams, selected from a menu, cover 
ear training, note recognition and 
writing, rhythm practice, and listen- 
ing enjoyment. These versatile 
games are written for ages 5 
through adults. #261 16, $39.95 



PEN PAL gives you the power and 
versatility of higher-priced word 
processors in an easy-to-use format. 
With only 29 commands, you can 
quickly and easily create lengthy 
reports or short memos. PEN PAL 
gives you 40- and 80- column screen- 
ing, joystick control of the cursor for 
quick editing, complete printer con- 
trol, plus both upper and lower case 
capabilities. PEN PAL is the afforda- 
ble solution to your word process- 
ing needs. #25115, $59.95 

Advanced Operating Systems has 
four good ways to make you and 
your Apple grow and grow! 

Now available at your local 
software retailer, or call 1-800-428- 
3696 to order (Indiana residents, 
call (317) 298-5566.) MasterCard 
and VISA accepted. 

ADVANCED 
OPERATING 
SYSTEMS 

4300 West 62nd Street 
P.O. Box 7092 
Indianapolis, IN 46206 

A Division of 

Howard W. Sams & Co., Inc. 



Apple, Apple II and Apple II Plus are registered 
trademarks of Apple Computers, Inc. 



AARDVARK ~ THE ADVENTURE PLACE 

ADVENTURES FOR OSI, TRS-80, TRS-80 COLOR, SINCLAIR, PET, VIC-20 



ADVENTURES — Adventures are a unique 
form of computer game. They let you spend 
30 to 70 hours exploring and conquering a 
world you have never seen before. There is 
little or no luck in Adventuring. The rewards 
are for creative thinking, courage, and wise 
gambling — not fast reflexes. 

In Adventuring, the computer speaks and 
listens to plain English. No prior knowledge 
of computers, special controls, or games is re- 
quired so everyone enjoys them — even people 
who do not like computers. 

Except for Quest, itself unique among Ad- 
venture games. Adventures are non-graphic. 
Adventures are more like a novel than a comic 
book or arcade game. It is like reading a par- 
ticular exciting book where you are the main 
character. 

All of the Adventures in this ad are in Basic. 
They are full featured, fully plotted adventures 
that will take a minimum of thirty hours (in 
several sittings) to play. 

Adventuring requires 16k on Sinclair, TRS- 
80, and TRS-80 Color. They require 8k on OSI 
and 13k on VIC-20. Sinclair requires extended 
BASIC. 

TREK ADVENTURE by Bob Retelle - This 
one takes place aboard a familiar starship and 
is a must for trekkies. The problem is a famil- 
iar one — The ship is in a "decaying orbit" 
(the Captain never could learn to park!) and 
the engines are out (You would think that in 
all those years, they would have learned to 
build some that didn't die once a week). Your 
options are to start the engine, save the ship, 
get off the ship, or die. Good Luck. 

Authors note to players — I wrote this one 
with a concordance in hand. It is very accurate 
— and a lot of fun. It was nice to wander 
around the ship instead of watching it on T.V. 

CIRCLE WORLD by Bob Anderson - The 

Alien culture has built a huge world in the 
shape of a ring circling their sun. They left 
behind some strange creatures and a lot of ad- 
vanced technology. Unfortunately, the world 
is headed for destruction and it is your job to 
save it before it plunges into the sun! 

Editors note to players — In keeping with 
the large scale of Circle World, the author 
wrote a very large adventure. It has a lot of 
rooms and a lot of objects in them. It is a very 
convoluted, very complex adventure. One of 
our largest. Not available on OSI. 

HAUNTED HOUSE by Bob Anderson - This 
one is for the kids. The house has ghosts, gob- 
lins, vampires and treasures — and problems 
designed for the 8 to 13 year old. This is a 
real adventure and does require some thinking 
and problem solving — but only for kids. 

Authors note to players — This one was fun 
to write. The vocabulary and characters were 
designed for younger players and lots of things 
happen when they give the computer com- 
mands. This one teaches logical thought, map- 
ping skills, and creativity while keeping their 
interest. 



DERELICT by Rodger Olsen and Bob Ander- 
son — For Wealth and Glory, you have to ran- 
sack a thousand year old space ship. You'll 
have to learn to speak their language and 
operate the machinery they left behind. The 
hardest problem of all is to live through it. 

Authors note to players — This adventure 
is the new winner in the "Toughest Adventure 
at Aardvark Sweepstakes". Our most difficult 
problem in writing the adventure was to keep 
it logical and realistic. There are no irrational 
traps and sudden senseless deaths in Derelict. 
This ship was designed to be perfectly safe for 
its' builders. It just happens to be deadly to 
alien invaders like you. 




PYRAMID by Rodger Olsen - This is one of 
our toughest Adventures. Average time 
through the Pyramid is 50 to 70 hours. The 
old boys who built this Pyramid did not mean 
for it to be ransacked by people like you. 

Authors note to players — This is a very 
entertaining and very tough adventure. I left 
clues everywhere but came up with some in- 
genous problems. This one has captivated 
people so much that I get calls daily from as 
far away as New Zealand and France from 
bleary eyed people who are stuck in the 
Pyramid and desperate for more clues. 

GUEST by Bob Retelle and Rodger Olsen - 

THIS IS DIFFERENT FROM ALL THE 
OTHER GAMES OF ADVENTURE!!!! It is 
played on a computer generated map of 
Alesia. You lead a small band of adventurers 
on a mission to conquer the Citadel of Moor- 
lock. You have to build an army and then arm 
and feed them by combat, bargaining, explora- 
tion of ruins and temples, and outright ban- 
ditry. The game takes 2 to 5 hours to play 
and is different each time. The TRS-80 Color 
version has nice visual effects and sound. Not 
available on OSI. This is the most popular 
game we have ever published. 

MARS by Rodger Olsen - Your ship crashed 
on the Red Planet and you have to get home. 
You will have to explore a Martian city, repai r 
your ship and deal with possibly hostile aliens 
to get home again. 

Authors note to players — This is highly 
recommended as a first adventure. It is in no 
way simple — playing time normally runs from 
30 to 50 hours — but it is constructed in a 
more "open" manner to let you try out ad- 
venturing and get used to the game before 
you hit the really tough problems. 



NUCLEAR SUB by Bob Retelle - You start 
at the bottom of the ocean in a wrecked Nu- 
clear Sub. There is literally no way to go but 
up. Save the ship, raise her, or get out of her 
before she blows or start WWIII. 

Editors note to players — This was actually 
plotted by Rodger Olsen, Bob Retelle, and 
someone you don't know — Three of the nas- 
tiest minds in adventure writing. It is devious, 
wicked, and kills you often. The TRS-80 Color 
version has nice sound and special effects. 

EARTHQUAKE by Bob Anderson and Rodger 
Olsen — A second kids adventure. You are 
trapped in a shopping center during an earth- 
quake. There is a way out, but you need help. 
To save yourself, you have to be a hero and 
save others first. 

Authors note to players — This one feels 
good. Not only is it designed for the younger 
set (see note on Haunted House), but it also 
plays nicely. Instead of killing, you have to 
save lives to win this one. The player must 
help others first if he/she is to survive — I like 
that. 

Please specify system on all orders 




ADVENTURE WRITING/DEATHSHIP by 
Rodger Olsen — This is a data sheet showing 
how we do it. It is about 14 pages of detailed 
instructions how to write your own adven- 
tures. It contains the entire textof Deathship. 
Data sheet - $3.95. NOTE: Owners of OSI, 
TRS-80, TRS-80 Color, and Vic 20 computers 
can also get Deathship on tape for an addi- 
tional $5.00. 

PRICE AND AVAILABILITY: 

All adventures are $14.95 on tape except 
Earthquake and Haunted House which are 
$9.95. Disk versions are available on OSI and 
TRS-80 Color for $2.00 additional. 



ALSO FROM AARDVARK — This is only a partial list of what we carry. We have a lot of other games (particularly for the 
TRS-80 Color and OSI), business programs, blank tapes and disks and hardware. Send $1.00 for our complete catalog. 



V^ 



AARDVARK -80 

2352 S. Commerce, Walled Lake, Ml 48088 

(313)669-3110 

Phone Orders Accepted 8:00 a.m. to 4:00 p.m. EST. Mon.-Fri. 



% 



TRS-80 COLOR 



SINCLAIR 



OSI 



VIC-20 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



A Monitor for 
the Color Computer 



by Ralph Tenny 



This article provides step-by- 
step instructions to get 
composite video from the video 
section of the Color Computer. 
You will use this signal to drive 
a standard video monitor 
instead of a color or black-and- 
white TV set. 



Required: 

TRS-80 Color Computer 
A monitor-quality CRT 



The Radio Shack Color Computer, an 
excellent low-cost computer, uses a 
color TV set as the intended display 
device. Unfortunately, TV sets have 
relatively low resolution, which limits 
the clarity of the display. The use of a 
TV set can be either good or bad, de- 
pending on whether color graphics are 
used in your program. Since I use it as a 
text processing system, I need a video 
terminal with maximum display clari- 
ty. Even the relatively low character 
density of the Color Computer's video 
output isn't very clear on the average 
TV set — either color or B&W. The 
signal itself is of high technical quality, 
and a higher-resolution display can 
make a great improvement in the read- 
ability of the display. If a B&.W monitor 
is substituted for the TV set, this goal is 
achieved. As you can see from photo 1, 
my video monitor (which is not a 
super-high resolution unit) gives an ex- 
cellent display capability when used 
with the Color Computer. 

Since the remainder of the article 
describes a process of modifying the 
Color Computer, you should realize 
that any internal modifications will 
probably void the warranty. If the com- 
puter is more than three months old, 
the warranty will have expired. If you 
modify the computer and it needs 
repair, you may have to remove the 
modification before Radio Shack will 
repair it. I have not had any problems in 



over a year, and I still feel comfortable 
with my decision. 

The Color Computer's video output 
is a complete TV signal and is gener- 
ated by a very low-power TV trans- 
mitter mounted within the Color Com- 
puter. Part of the display problem is the 
fact that the TV tuner is deliberately 

10 MAff TflPTST 

15 DPT SO 

20 ORG S7000 

£5 ♦ THIS PROGRftH HRITE-S d FftTTE 
RH TD CASSETTE TftPEt THEH WILL ^ 
ECDBE THE PflTTERK 

:30 ♦ CHECKIHG FDR TAPE ERRORS flit 
Id STOPPING DH ERRORS. 

i35 ♦ THE WRITE FtfMGTIOH IS (*tt EH 
(W.ESS LOOP, AND «OST BE STOPPEB 

iiSim RESET,! 

Photo 1: A close-up look at a Color 
Computer display on a video monitor. 
Note that each pixel is a sharply- 
defined square. 



limited, therefore the signal must also 
be limited. Even if the tuner is by- 
passed, the TV's display resolution is 
reduced as a cost-saving measure, since 
high resolution is not required for nor- 
mal TV viewing. 

The Color Computer uses an 
MC6847 Video Display Generator to 
produce all the signals required to drive 
a TV set; these include composite sync, 
blanking, video luminance, and color 
information. The basic approach is to 
use a buffer amplifier to process the 
output of the MC6847, enabling the 
signal to be fed directly to a video 
monitor. Figure 1 shows the schematic 
of this buffer amplifier; it was patterned 
after circuitry suggested by Motorola, 
the manufacturer of the 6847. This 
amplifier was built on thin, two-sided, 
copper-clad board with one side etched 
into small pads. Figure 2 is a full-size 
layout of the amplifier board, and figure 
3 shows the parts layout. 

Access to the Color Computer is 
easy and requires only that you take 
out seven screws to remove the top. 
Note that one screw is located beneath 
a factory seal. If you remove this screw 



+ 5V 



SIGNAL IN -t-|(. 




VIDEO 



SHIELD 



COMMON -ir 



Figure 1: Schematic for the video buffer amplifier, which mounts internal to the 
computer. It amplifies the video output of the 6847 and turns It into a low- 
impedence signal suitable for driving a cable to the external monitor. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



19 



'T'Ci'* 



ftuy. 



TV 



~mi%4^ 



«• %«*•-■ I 



Figure 2: Full-size layout of the 
amplifier board. Make tfie board by 
etching the lines shown to divide the 
board into eight segments as shown. 



%%%%>'*^'^>^^^'*'*^^**>!T/r 



;//wvJii 



Pfioto 2: interior view of the area where the amplifier will be mounted. The long IC Is 
the MC6847, which will be covered by the buffer amplifier as shown In photo 3. 




Pfioto 3: A view of the buffer amplifier mounted, with the output cable attached. 




Pfioto 4: Oscillogram of the output video 
showing one video frame. 



20 



Photo 5: An oscillogram of three lines of 
horizontal video. 



MICRO - The 6502/6809 Journal 



you will deface the seal, which voids 
your warranty. 

Once you loosen the screws, put a 
piece of tape over each hole so the 
screws will not fall out when you turn 
the computer upright. With the screws 
loosened, the top will lift off, leaving 
the keyboard resting on standoffs and 
revealing the inner RF shield. 

Note that the top of the shield is a 
friction fit to the shield sides via 
numerous spring-loaded fingers. Work 
the shield top off by lifting it a little bit 
all around; keep lifting until it lifts 
straight off. Once you can see inside, 
find the MC6847 and MC1372 ICs as 
shown in photo 2. Also, in photo 2, you 
will note a solid ground wire curving up 
over the 6847, plus a heavy wire com- 
ing from one side of C26 and smaller 
wire coming off the circuit board be- 
tween C42 and the 1372. The solid 
wire is circuit common, the large wire 
is -(- 5 volts, and the small wire is the 
signal input to the buffer board. Photo 3 
shows the video buffer installed, 
resting on the 6847. The large wire has 
been soldered to the -i- 5 volt input of 
the buffer board, the ground wire to the 
amplifier common, and the small wire 
to the amplifier input. A small 
183-ohm cable has its shield soldered 
to the amplifier common and the 
center conductor to the amplifier out- 
put. The other end of the 183-ohm 
cable runs across to the comer of the RF 
shield (the top left corner of the shield 
as seen from the front of the computer) . 



Parts List for 

Video Buffer Amplifier Circuit 

C3 68 pF dipped mylar 

capacitor 
Rl 33K ohm, !4-watt resistor 

R2 62K ohm, i4-watt carbon 

resistor 
R3 5. IK ohm, W-watt carbon 

resistor 
R4, R5, R6 51 ohm, !4-watt carbon 

resistor 
Ql, Q2 2N2222 NPN transistors 



No. 54 - November 1982 



' 



COMMON 




SHIELD 



VIDEO 



SIGNAL 



+ 5V 



Figure 3: Parts layout for the amplifier board. Each part is soldered Into place In 
the approximate location sketched. 



Once the amplifier is in place, ttim on 
the computer and check the video out- 
put from the cable. Photo 4 shows one 
vertical frame of video, and photo 5 
shows three horizontal lines of video. If 
your amplifier does not have similar 
output, double-check the circuit and 
adjust C2 until the response is correct. 
After testing the amplifier, send its 
output into a video monitor and make 
whatever level adjustments are needed 



to obtain a good picture. Once the 
monitor is working, re-install the com- 
puter cover and enjoy your computer's 
new display. 



You may contact the author at P.O. Box 
545, Richardson, Texas 75080. 



JMCftO 



OHIO SCKHTIFIC 

THE WIZARD'S CITY — 

search for gold in the dun- 
geons beneath the Wizard's 
city or in the surrounding 
forest. A dynamic adventure 
allowing progress in strength 
and experience. All 081 — 
cassette $12.95, disk $15.95. 

OSI HARDWARE 15% OFF 
RETAIL PRICES! 

GALACTIC EMPIRE - a strat- 
egy game of interstellar con- 
quest and negotiation. Com- 
pete to discover, conquer, and 
rule an empire with the com- 
puter or 1-2 other players. G4P, 
C8P cassette $12.95, disk 
$15 95 

AIR TRAFFIC ADVENTURE - 
a real time air traffic simula- 
tion. C4P, C8P disks $15.95. 
Plus S-FORTH, PACKMAN, 
CRAZY BOMBER, ADVEN- 
TURE, TOUCH TYPING, IN- 
TELLIGENT TERMINAL and 
more. Send for our free 
catalog including photos and 
complete descriptions. 
(312)259-3150 

Aurora Software Associates 

B37 S. Mitchell 
Arlington Heights 
^^ Illinois 60005 



Olympic SAL6S co ^5{-] 



Telex: S7 34 77 Tall-Free Phone Qrdere: 
Toll-fru ii« c») aOO-2S2.21S3 100421-8045 (out of CAI 
Older Oeshs open 8 days a week! 7:00 AM to 6:00 PM Mon-Sat 
P.O. 80x74845 216 So. Oxford Ave. Los Angeles, CA 90004 
Phone: (213) 739-1130 Cable: -OLYRAV" ISA 



m 



HEWLETT 
PACKAnO 



LCD 




HP-16C Computer Sciemist- 
for Programmers & Digital 
Designers 127.50 WE ARE AUTHORIZED 
FULL LINE HP Dealers. 



HP-IOC 

Up to 79 

lines of 

program 

storage 

RE:$80.00 

$80.00 

Your Cost: 

$69.95 



We carry dote to 
SS.OOOMQ inmntorY at all 
" — 1, Corp. accta. invited. 



Good sutfecT to availability; this ad supercedes 
all praviaut ads; fob our tvarafiouse; prices sub- 
ject to change without notice; not responsible 
■ errors; alt orders subject to 
n shpg a hndig SSS~ 
ml for ' -■ 



nfpo^raphicai 

fication; minii - . _ 

Send $2 lor S5 foreign) for our famous catalog. 



ISpecify serial 
or parallel I 



TP-I 
TEXT PRINTER, 

RE:S995.oo Daisy 

Smith-Corona 



BMC 12" 
Green 
Monitor 

Model BM-12A 

$0095 



Texas Instruments 

TI-5010 

Handheld Calculator 

Plain paper printer 

$39.95 



PRICE 
BREAK-THROUGH! 
Cordless Telephone 

KP-6100 



lll^^mAD '^OUR COST: 

VK#l\Jn $395.00 

VICTOR 5080 80 Column Printer 

A real work horsellOO cps, graphics, 

buffer, 4 Interfaces Including HP-IB 

Retail: $995.00 Wholesale:$670.00 

Fully guaranteed by Victor, in business 

since 1918 



ATARI^COMPUTERS 



ATARI 8IXI-16K 847 J5 

ATARI II10.41K (Axloo 32K chip) 779 J5 
Atari 810 Disk Drive 459.95 

Atari Interface Module 177.95 

Atari Educator K'lt 117J5 




"feixas Instruments 
Home^^mputer 

TI-99/4A, 



OKIDATA PRINTERS 

B2A Bi.directioinl 444.95 

B3A Bi-dir;serial/panllel 694.95 

84 Parallel, 200 CPS 1144J5 

84 Serial, 290 CPS 1274.95 



EXTEND-A-PHONE 

EX-4000 Cordless Speaker Phone 

Re:K29.95 Y/C:$1 63.95 




olivelll 

"PRAXIS 35" 
ELECTRONIC nPEWRITER 
Interchangeable 'Daisy 
Wheel' type element, 
3 sizes-Pica, Elite 8i Micro 
plus cartridge ribbon 8i morel 

Retail: $750.00 




Now 
Only 



AFTER MFG'S 
REBA TE-you pay 
OSC $299.95, Tl rebates you $100. 

Plus FREE $50 RF Modulator 

with purchase of TI-99/4A 

Call & ask about FREE Speech 
Synthisizer OFFER! 




ATARI 4a0-16K 

$199.95* 

* Yau pay OSC S259.95 & receive a coupon 

wonli up to S69 in rebates from Atari on 

the purchase of add'l software or 

accessories for the Atari 400. 



Cz. commodore 

VIO20 

FREE RF Modulator 

with purchase of VtC'20 

WorkswithanyTV! 
5K Personal Computer 
(Expands to 32K) 
We are authorized FULL- 
LINE Commodore dealers. 




Your Cost: ^. q_ q,. 

Retail: $300.00 ifH 3 # .33 
Model 1 540 Single Sy."Drive 334.95 
Model 1 51 S Graphics Printer 329.95 
Model 1 530 Datasette Recorder 59.95 



LEX-21 $ 
Portable 
Terminal 8y."xivx2!4- 

LEXICON 



'995 




SHARP 

HAND-HELD 

COMPUTERS 
PC 1500 Pocket Computer 
CE 1 50 Color graphic printer w/cass. interface 
4K Expansion module 
8K Expansion module 



213.95 

173.95 

53.95 

103.95 



f^ SANYO 

High resolution, number one seller! 



lUONITORS 



VU4S09 

VM4215 

DMS109 

DM8012 

DU8112 

DMC6013 

DMC6113 

OM2012 

DM2112 



9"B&W 

15"B&W(helow our cost) 

9" Green 

12"B&W 

12" Green 

13" Color, hi qualitv 

13" Color RGB hi res 

(NEW)12"B&W 

(NEW) 12" Green 



your 
Retail Cost 

19Q.0Q 159.95 
349.00 189.95 
200.00169.95 
260.00199.95 
260.00 209.95 
470.00 399.95 
995.00 799.95 
179.00139.95 
199.00159.95 



10" color monitor high res 339.95 

32K memory module 314.95 

Extended Basic 75.00 

Speech synthesizer 129.95 

Disk memory drive 394.95 

Telephone coupler (modem) 189.95 

Printer (solid state) 319.95 

TI-LOGO 99.95 

Tl EXPANSION BOX SYSTEM 

PHP 1200 Expansion Box 209.95 

PHP122GRS232 136.00 

PHP 1240 Disk Controller 194.00 

PHP 1250 Disk Drive 299.00 
PHP 1260 32K Mem. expansion 234.00 

PHP 1270 Pascal Card 194.00 

Programmable TI-59 
Your Cost:$1 69.95 plus- 
$20.00 rebate from Tl plus Free Library 
Tl LCD Programmer 59.95 
WE ARE AUTHORIZED FULL 
LINE Tl DEALERS 



APPLE COMPUTER 

48K Plus 1069.95 

Disk dr «v/controller 494.95 

Disk dr - no controller ^^^-^ 

Apple 2 System package 1 695.00 



No. 54- November 1982 



MICRO - The 6502/6809 Journal 



21 



FOR COMPLETE GRAPHICS: 

UersakUriter 



EDUCATION 



Whether you are a 
teacher, an artist, an 
engineer, a 
programmer, or a 
hobbiest with little or no 
programming experience, 
the VersaWriter is the 
answer to your graphics I 
need. With the VersaWriter 
exploring the world of micro 
computer graphics is as easy' 
OS tracing. The VersaWriter 



ARTIST 



GAME PROGRAMMER 




doesn't just trace 
picture though. With 
simple one key com- 
mands you can odd 
color and text to your pic- 
tures, move objects across 
the screen, make scale 
drawings and even draw 
with different size brushes. 
The VersaWriter is as limitless 
as your imagination. 



For complete graphics on your Apple ll/l(+, or IBM PC, the Versa Writer from Verso Computing, Inc. is your answer. 
Complete hardwore/softwore system ready for use - $299. 



Send for information 
on tfie complete line 
of VE^iiWi^E & Graphics 
Products 



V 



coiiiPULinc, inc. 



Dealer 
Inquiries 
Welcome 



3541 Old Conejo Rood, Suite 104 • Newbury Parl<, CA 91320 • (805)498-1956 



22 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



FLEX and the TRS-80 
Color Computer 



by Ronald W. Anderson 



Here is a brief description of the 
FLEX09 operating system as 
implemented on the TRS-80 
Color Computer. 

The configToration described here is 
available from Frank Hogg Laboratories 
(130 Midtown Plaza, Syracuse, NY 
13210J with 64K or RAM installed 
($1275), as well as an assortment of 
disk drive packages. If you already have 
a TRS-80, then Frank Hogg Labora- 
tories sells the operating system and 
modification instructions separately 
($99). While it is possible to run the 
FLEX operating system with one disk 
drive, two are recommended. You may 
choose from a minimum package of 
one single-sided, double-density, 
35-track drive, or up to three double- 
sided, double-density, 40-track drives. 
The latter will hold up to 375K of data 
on each drive. You may also use one of 
the 80-track, double-density drives and 
have over 700K bytes on one disk, 
although the 80-track version is not 
compatible with Radio Shack's disk 
operating system. 

FLEX is the standard operating 
system for 6800 and 6809 systems. 
FLEX is so universal that there are ver- 
sions that will run on the Motorola Ex- 
orciser. FLEX is a "Unix-like" 
operating system and has a nice set of 
calls that do all the work to interface 
your assembler program to the disk 
drivers. There are literally 100 utility 
programs available for FLEX. 

The manual that comes with the 
operating system is basically the FLEX 
operating system manual with addi- 
tional pages that apply to the Color 
Computer. There is a well-written sec- 
tion on getting your system up and run- 
ning. First you configure the software 
to match your hardware. The system 
boots up expecting 35-track, sLngle- 
sided drives. To access more tracks or 
double-sided drives, you must run a 
utility program that will tell the 



system you have 40 tracks and double- 
sided drives, for example. Your drives 
need not all be alike. You may specify 
drive as being single-sided and having 
35 tracks, and drive 1 as being double- 
sided and having 40 tracks. Although 
this might seem like a nuisance, you 
only need to run the utility program 
once. This generates a command file 
that is appended to FLEX containing in- 
formation on your drives, the terminal, 
and drivers for your printer. 

I did a bit of experimenting with the 
SETUP command that does all the con- 
figuring, and discovered I could specify 
"reverse video," which is really "nor- 
mal video' ' to anyone who has worked 
in front of a terminal for any time. I 
find a blinking cursor to be distracting, 
so I made it a plain block cursor. Now 
my system will power up just the way I 
want it. 

Another feature is the keyboard's 
ability to provide all the ASCII codes. 
The control codes, such as Control C, 
are generated by holding the shift and 
up arrow simultaneously (equivalent of 
the control key on a terminal), and 
then pressing the desired key, C for ex- 
ample. If you ever program in Pascal 
and/or "C", you will need several 
characters that are not included on the 
Color Computer keyboard. 

Without going into detail, I will 
give an example of the key assignments 
and how to access them. You may 
remember that upper case (SHIFT) 8 is 
a left parenthesis "(", and SHIFT 9 is a 
right parenthesis ")". Use the CON- 
TROL combination (SHIFT A ) and 
type 8 and you get a left square bracket 
"[". SHIFT A 9 and you get a right 
square bracket "]". "C" requires the 
use of curly braces. SHIFT A BREAK 8 
will cause a left brace "{" to be 
generated, and the same combination 
for a 9 will generate a right curly brace 
"}". The control and shift keys are 
depressed first, and are all held 
simultaneously before keying the 8 or 



9. Holding three keys down and typing 
a fourth is not easy, but it's better than 
not being able to generate the code for 
those characters. 

Sometimes disk drives run slightly 
fast, or irregularly, and squeezing the 
sectors close enough to get 18 on a 
track results in unreliable disk access. 
There is a NEWDISK utility that will 
automatically reduce the number of 
sectors to 17 if it encounters problems. 
Another NEWDISKA utility will put 18 
sectors on closer together. I have had 
no trouble using NEWDISKA. A sector 
in the FLEX system is 256 bytes long, 
but four bytes are used for system pur- 
poses, so a sector actually holds 252 
bytes of data. A single-sided, 35-track 
disk will hold 612 sectors (using 
NEWDISKA). If your drive has 40-track 
capability, you will get 702. A double- 
sided 40-track will result in 1404. If 
these numbers don't seem to add up 
correctly, it is because FLEX uses the 
first track (track 0) for a loader, disk 
system information record, and file 
directory sectors. Also, FLEX requires 
that track always be single density. 
Therefore, the tracks actually available 
to the user are one less than the total 
number on the disk. 

Once FLEX is running, make 
another copy of the system disk. Use 
NEWDISK or NEWDISKA to format a 
blank disk, and then use a utility called 
PUTBOOT.LDR to install the loader 
on the disk. The loader is readable by 
the Color Computer disk operating 
system. It loads a short program that 
loads and executes a longer loader pro- 
gram that loads all of the FLEX 
operating system. It sounds com- 
plicated but only takes a few seconds to 
execute. You must put the boot loader 
on your disk first. If you have copied 
any files onto the newly formatted 
disk, there is a chance that the system 
may have allocated you space where 
the boot loader needs to be. PUTBOOT 
will inform you that you can only in- 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



23 



PROFESSIONAL 

WORD PROCESSOR 



FOR APPLE/PET/CBM 

COPY-WRITER 

only SI 85.00 



EXCHANGE DATA w IBM 3740 

PEDISK II 877 FLOPPY DISK Sys- 
tems can now read and write records 
/; from IBM "Basic Data Exctiange" 

""""^^t.",, ' " type diskettes. FILEX software from 
'"•'- WfLSERVE does all ttie worki Con- 
^t v.. wjris EBCDIC • ASCII. 

EXcS teWii% » Vl em (877/FILEX) $1 295. 

PEDISK 877-1 8' Floppy for PET $ 995. 

PEDISK 540-1 5' Floppy foe PET $ 595. 

CONTROLLER BOARD w PDOS $ 229. 

PEDISK II is a fiigfi performance floppy distt 
system designed for tfie Commodore PET/CBf^. 
Rocl(well AIM and Synertel< SYM. It features high 
performance, simple reliable design and IBM for- 
mat. 

SOFTWARE FOR PEDISK II 

COPYWRITER Pro Word Processor $1 85. 

MAE Macro Assembler Editor by EHS $1 70. 

FLEXFILE II Data Base Manager $ 80. 

PAPERMATE Word Processor $ 60. 

DISK UTILrTY PACK $ 25. 

FASTFILE Data Base $1 00. 

FILEX IBM Access Routines $245. 

MENU LOAD $ 10. 

fullFORTH^- $100. 



Commodore Communicatesi 


COMPACK 


$129. 


Intelligent Teminal 


Package 


including: ACIA ba^ 


ied interface 


DB25 ca 


ble 


STCP so 


ftware 


V Remote Telemetry 


- XON XOFF Control 


v Transfer lo/fr Disk 


^ User Program CntI 


V Printer Output 


' Status Line 



$139 COLOR CHART 

AIM/SYM system video cjisplay, 64 x 1 6 
characters, 8 colors, plugs Into ROM 
socket, 4K RAM Multiple modes; semi 
graphics, alpha. 

PET./CBM color graphic display, 1 28 x 
1 92 pixels, generate color bar graphs 
on one screen with data on main 
screen. RS170 video color chart. 
6847 based video output. 
COLOR VIDEO FOR PET/CBM/AIM/SYM 



ROMSWITCH -4 ROMS IN 1 

SPACEMAKER $39.95 

Switch 4 ROMs into the same socket 
A slide switch activates one of four 
Electronic controls insure no glitches 
and allow ROM switching under soft- 
ware control ROMs can be switched 
from the keyboard 

fiillFORTH+ for APPLE/PET 

FULL FIG FORTH implementation plus 
conditional assembler, floating point, 
stnng handling, multi-dimensional arrays, 
and disk virtual mamon/ 
fullFORTHMrom IDPC Co S100 

Target Compiler $ 50 



SEE YOUR DEALER OR: 



fMiCROTECHj La 

DEALER INQUIRIES INVITED 



PC Box 102 
Langhorne, Pa. 1 9047 
215-767-0284 



Stall the loader on a newly formatted 
disk, and quit. 

After installing the loader, you may 
copy everything from the system disk 
to your new system disk except the 
loader installation utility PUT- 
BOOT. LDR. An attempt to copy it will 
get you a DISK SPACE FULL error and a 
lot of garbage on your disk. If you try to 
GET PUTBOOT.LDR (for those of you 
not familiar with FLEX, GET is a utility 
that reads a disk file to memory but 
doesn't execute it), you will find that it 
tries to execute, finds that you haven't 
specified a drive number, and erases 
itself from memory before returning to 
FLEX. Unless you enjoy "puzzles" and 
are quite familiar with FLEX and the for- 
mat of binary files, you will have to use 
your master disk to make all further 
system disks. 

Having copied all the supplied files 
to your system disk, you must run one 
further utility, called LINK. LINK will 
tell the boot loader just where on the 
disk the file FLEX. SYS is located. My 
advice is to make two system disks, and 
hide the master and one of them in a 
safe place where they won't get hot, 
bent, or damaged by a magnet. When 
you wipe out your working system disk 
you can get the backup and generate 
another backup for the safe storage area. 

The video display looks like a ter- 
minal. Most terminals accept control 
codes to do such things as clear the 
screen, position the cursor for the next 
letter to be output, etc. A set of such 
codes has been provided. You can con- 
trol the display without getting into the 
assembler-level CRT driver code. That 
will make it easier for software suppliers 
to write compatible software for the 
Color Computer. 

The Color Computer format is 16 
lines of 32 characters each, and the 
character generator displays lower case 
in reverse video, which is barely usable. 
Software will soon be available to allow 
use of any standard ASCn RS-232 ter- 
minal on the serial port of the Color 
Computer. I have a preliminary version 
of the software which will eliminate the 
display problem completely, but I im- 
agine that many purchasers will want to 
use a TV set and the supplied keyboard 
for some time, before investing in a ter- 
minal. The enhanced display software 
will therefore be welcome. 

A SDC (single disk copy] utility 
allows copying with a single drive. It 
reads files from the source disk until 
memory is full or it has read all the files 
to be copied, then it prompts you to in- 
sert the destination disk for a write cy- 
cle, etc., until the copy is complete. 
LINK and PUTBOOT.LDR both prompt 
you, and therefore give an opportunity 
to change disks so these operations may 



be performed with a single disk drive 
also. 

The HELP utility and file help you 
find or remember FLEX commands. If, 
for example, you type HELP,NEWDISK 
you will get a brief description of what 
the NEWDISK utility does, and a 
reference to a page in the manual. 

If you have a serial printer, you will 
have no trouble configuring the system 
so you can use it effectively. A parallel 
printer will require a serial adaptor of 
some sort. Epson provides one for their 
printers, and Computerware of En- 
cinitas, CA, offers one for about $60. 

Of course you can run Radio Shack 
Extended Disk BASIC, which comes in 
the Color Computer in ROM. The RS 
disk operating system is well thought 
out. Both Random Access and Sequen- 
tial files are implemented. Since the 
Color Computer comes up running the 
BASIC from ROM, you might wonder 
where the operating system is. Actually, 
it is part of BASIC. While nmning 
BASIC you may DIR a disk (prints the 
directory of a RS disk). You may copy 
or back up a disk, load and save pro- 
grams (either BASIC or machine lan- 
guage), and still in BASIC, you may 
read or write any sector on the disk by 
specifying the track and sector number, 
and the ID of two string variables. The 
first 128 bytes of the sector is read 
to/written from the first named string 
variable, and the last 128 bytes to/from 
the second. That means you can write 
your own disk system and have fast ac- 
cess! Naturally, the RS BASIC has all 
the color graphics commands and 
sound commands, so you can write 
game programs and/or use graphics. 

The Color Computer is a good buy 
for anyone wanting to get into this ex- 
pensive hobby with a small invest- 
ment. If you have the minimum 
system from RS, which is very inexpen- 
sive, you can first have RS upgrade your 
Color Computer to 32K, and then do 
the very simple modification to 64K. 
From that point, you are off into the 
world of FLEX, with at least five Pascal 
compilers, three or four BASIC inter- 
preters, several versions of "C", For- 
tran, Cobol, a couple versions of 
FORTH, three editors, a good text pro- 
cessor, several assemblers, an excellent 
debugger program for assembler pro- 
grams, and much more. 



Mr. Anderson is vice president in charge of 
engineering for Industrial Computer 
Controls Corp. in Ann Arbor, MI. You 
may contact him at 3540 Sturbridge Ct., 
Ann Arbor, MI 48105. 



JMCftO 



24 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



FOR YOUR APPLE II 

Industry standard products at super saver discount prices 




PARALLEL PRINTERS 
NEC 8023 or C-ITOH 8510 

(Virtually identical) Specifications: • 100 CPS dot 
matrix printer • 80 column print- 136 characters 
per line • Tractor/friction feed • 7 different print 
fonts included • 2K printer buffer • Proportional 
spacing • Bit image grapfiics and graphic symbols. 

NEC 8023 or C-ITOH $495 

NEC 8023 or C-ITOH 8510 with 

Parallel Interface and Cable $550 

EPSON 100 with Parallel Interface 

and Cable $749 



Z-80 CARD FOR YOUR APPLE 
MICROSOFT SOFTCARD 

With CP/M- and MBASIC. 

(List: $399) $289 

--'■t^^ Best Buy!!! 

4Mt ADVANCED LOGIC SYSTEM 

-W^ Z-CARD WithC-PM- 

Has everything the Softcard has except MBASIC. 
Works with Microsoft's disks too. 

(List $269) Special at $195 

ALS SYNERGIZER 

CP/M" operating package with an 80 column 
video board, CP/M" interface, and 16K memory 
expansion for Apple II. Permits use of the full 
range of CP/M" software on Apple II. Includes 
SuperCALC. 

(List: $749) $549 

U-Z-80 PROCESSOR BOARD 

(From Europe) 

Software compatible with Softcard and 

ALS Software $149 

MICROSOn + PREMIUM SYSTEM 

Includes Videx Videoterm, Softswitch, Microsoft 
and Softcard, Microsoft and Z-8C Card, and 
Osborn CP/M" Manual $595 





,^00^ 



JOYSTICK 

Takes the place of two 
Apple Paddle Controllers. 

From BMP Enterprises. Heavy duty industrial con- 
struction and cable. Non-self centering. With 
polarity switches for consistent motion control. 

(List: $59) $39 

MONITORS FOR YOUR APPLE 

AIVIDEK30aG 

(18MHZ Anti-Glare Screen) $179 

NEC 12" HIRES GREEN $179 

SUPER SPECIAL! 
SPECIAL 12" GREEN MONITOR $99 



SPECIAL AND NEW 

5 MEGABYTE HARD DISK 

For Apple II. Supplied with controller. Use with 
CP/M, Apple DOS, & Apple Pascal $1995 

5V4" DISK DRIVE 
Use with standard Apple II disk controller. .$295 

51/4" FLOPPY DISKS 

Withhubrings.Boxof10. 

With other purchase $19.95 

Without purchase $23.00 

16K MEMORY EXPANSION MODULE 

The preferred 16K RAM Expansion Module from 
PROMETHEUS. Fully compatible with CP/M" and 
Apple Pascal". With full 1-year parts and labor 
warranty. (List: $169) $75 

WORD PROCESSING SPECIAL 
WITH WORDSTAR AND SUPERCALC! 

Do professional word processing on your APPLE. 
All necessary hardware and software included. 
Complete 80 column video display, enhanced 
character set, 16K memory board, Z-Card with 
CP/M " software, Wordstar and word processing 
software and SuperCALC. 

(List: $1,128) ...Special at $695 

from Prometheus! ExpandaRAM 

The only 128K RAM card that lets you start with 
16K, 32K, or 64K of memory now and expand to 
the full 128K later. Fully compatible with Apple 
Pascal, CP/M", and Visacalc. No Apple modifi- 
cation required. Memory management system in- 
cluded with all ExpandaRAMs. Disk emulators 
included with 64K and 128K versions. 

MEM-32 Two rows of 16K RAMS 

make a 32K RAM Card $209 

MEM-64 One row of 64K RAM. 

With DOS 3.3 disk emulator $299 

MEM-128 Two rows of 64K RAMS installed 

makea128KCard. 

With DOS 3.3 disk emulator $399 

MEM-RKT 64K RAM Add-On-Kits- 

64K Dynamic RAMS. Each $125 

VISICALC Expansion Program 

for MEM-128 $75 

MEM-PSL Pascal disk emulator for 

MEM-128 $45 

MODEMS FOR YOUR APPLE II 

HAYES Smartmodem $229 

MICROMODEMII $279 





VERSAcard FROM PROMETHEUS 

Four cards on one! With true simultaneous opera- 
tion. Includes: (1) Serial Input/Output Interface, 
(2) Parallel Output Interface, (3) Precision Clock/ 
Calendar, and (4) BSR Control. All on one card. 
Fully compatible with CP/M" and Apple Pascal". 

(List: $249) $169 




80 COLUMN 

VIDEO DISPLAYS 

FOR APPLE II 

SMARTERM 

(Not to be confused with SUPRTERM) 

Software switching from 80 to 40 and 40 to 80 
characters. 9 new characters not found on the 
Apple keyboard. Fully compatible with CP/M" and 
Apple PASCAL". With lowest power consumption 
or only 2.5 watts. 

(List: $345) $225 

SMARTERM EXPANDED CHARACTER SET 

7" x 11" matrix with true decenders. Add to 
above $40 

„ „ . Combination SMARTERM and 
Best Buy! EXPANDED CHARACTER SET 

Special at $260 

VIDEX, VIDEOTERM $249 

VIDEX ENHANCER II $119 

JMl CENTRONICS COMPATIBLE 
^PF^ PARALLEL INTERFACE 

From PROfVIETHEUS. For use with Epson, NEC, 
C-ITOH, and other printers. Fully compatible with 
CP/M » and Apple Pascal*. 

PRT-1,0nly $69 

GRAPHini CARD 

Prints HIRES page 1 or 2 from onboard firmware. 
Features: True 1:1 aspect ratio, prints emphasized 
mode, reverse mode, rotates 90 degrees . . . plus 
more. Compare all this with the Grappler. We think 
you'll agree that this is the best graphics card on 
the market. Specify for use with EPSON, NEC- 
8023, C-ITOH Prowriter, orOkidata. 

(List: $125) $89 

SOFTWARE 

WORDSTAR Special at $195 

SPELLSTAR $125 

SUPERCALC $175 

D BASE II $525 

VISICALC $149 

DB MASTER $189 



All equipment shipped factor/ fresh, Mahufacturers warranties 
included. Please add $3 00 per product for shipping and handling 
California: add 6% tax. BART Counties 6V2% 

All items are normally in stock 

Phone for Quick 
Shipmentt 

415)490-3420 

... And we'll be here to help after you 

receive your order. Feel free to call the SGC 

Technical Staff for assistance. 

The tnail order specialists 

342 Quartz Circle, Livermore, CA 94550 




No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



25 



68000 
Binary Arithmetic Operations 



by Joe Hootman 



A short discussion of tlie 
various instructions for binary 
aritlimetic including addressing 
and sign information. 



The most extensive list of instructions, 
and some of the most frequently used, 
are the Binary Arithmetic Operations 
(table 1). Most of the binary operations 
are straightforward however, there are 
several instructions unique to the 
68000. 

The binary operations usually do 
not apply to operations on the address 
registers. However, in the binary arith- 
metic instruction implementation of 
the 68000, there are several instruc- 
tions such as ADDA, CMPA, and 
SUBA that are designed for operation 
on the address register. The operations 
on the address register allow special ad- 
dressing operations to be carried out 
and, more importantly, allow the com- 
parison of the magnitude of the address 
register without using the CHK in- 
struction. Clearly the address registers 
can be used as data registers or index 
registers. Three instructions deal with 
sign extension: ADDX, EXT, and 
NEGX. All of the sign extension in- 
structions sense the sign bit of the 
operation and the sign is extended 
through the length of the word. 

When arithmetic instructions are 
considered, the implementation of the 
signed multiply and divide and the un- 
signed multiply and divide must be 
considered a most worthwhile and 
powerful addition to the instruction 
set. The signed and unsigned multiply 
and divide instructions are all 16-bit in- 
structions. The data to be operated on 
is a word in length; the result of the 
operation is 32 bits long (long word). 
The interpretation of the 32 bits 
depends on the particular instruction. 
For example, if DO contains $8055, Dl 
contains $0002, and MULS Dl, DO is 
executed, the result [$FFFFOOAA) will 



be left in data register DO. Since the 
most significant bit of the word is set, 
this indicates that the result is negative 
and the N bit is set in the CCR. If DO 
contains $8055, Dl contains $0002, 
and MULU Dl, DO is executed, then 
the result ($000100AA) will be in DO. 
The signed and unsigned divide 
have characteristics similar to the 
multiply instructions. If division by 
zero is attempted, a trap will occur and 
overflow is indicated by the state of the 
V bit in the CCR. If Z is set then the 



quotient is zero. The N bit follows the 
most significant bit of the result. In 
both the signed and unsigned divide the 
quotient is the lower 16 bits of the 
destination register and the upper 16 
bits is the remainder. The sign is 
reflected by the most significant bit of 
the result. 

The TST instruction subtracts the 
designated data from zero and the ap- 
propriate bits set in the CCR. This in- 
struction testing of byte, word, and 
long word data is reflected in the CCR. 



Table 1: Binary Arithmetic Operations 

'The addressing modes will be covered in future issues. 

Mnemonic Data Size/CCR Function Comments 



ADD 



8, 16, .^2 

COR 

XNZVC 



Add Binary 



This operation add.s the binary data dcsij^natcd 
by [he source to the data designated by the 
destination and leaves the result in the 
destination. If the effective address is a source 
then all addre.s.sing modes can be used. 
Opword Formal 
15 14 1.3 12 11 in y 8 7 6 5 4 .3 2 1 I) 



110 1 



RcKisier Op Mode infective Address 
Mode . Re);istcr 



Register — Any of the ciRht data rcRisters 

C5p Mode 

Hyte Word Long Word Operation 

000 001 010 Dn 4 EA-* Un 

100 101 lU) hA * nn-» EA 

The source can have all the addres.s modes except 
13, 14.* 

The destination can have all the address modes 
except 1, 2, 10, 11, 12, n, 14.' 



ADDA 



16, 32 

CCR 

XNZVC 



Add Address This instruction adds the source data to the 
designated address register and leaves the 
result in the address register. 



IS 14 1,3 12 11 10 y 8 



6 5 4 3 2 10 



110 1 



Register 



Op .Mode Kffectiye Address 
I IVIode . Kcgister 



The register field can he any of the 8 addre.ss 
registers. This is always the destmation. 

Op Mode 

Oil - Word operaiinn the sign will be extended 
to all 32 bits of the address register. 

1 1 1 - Long operation 

All addressing modes arc allowed except H, 14 " 



(continued) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



27 



Mnemonic Data Slze/CCR Function 



Comments 



ADDI 



8, 16, 32 
CCR 
XNZ VC 



Add This instruction adds immediate data to the 

Immediate destination data and leaves the result in the 
destination. 



15 14 13 12 11 10 9 8 


7 6 


5 4 3 2 10 


110 


Size 


Effective Address 
Mode Register 


Word data (16 bits) Byte data (8 bits) 


Long word (32 bits, including previous word) 



Size field: 00 - Byte 
01 - Word 
10 - Long word 

All addressing modes except 10, 11, 12, 13, 14 
can be used as a destination.* 



ADDQ 



8, 16, 32 


Add 


CCR 


Quick 


XNZ VC 





« * « * « 



This instruction allows the binary addition of 
any data from 1 to 3. 



15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



1 1 



Data 



Size 



Effective Address 
Mode Register 



The data field can contain any integer from 1 to 7. 
Size field: 00 - Byte 

01 - Word 

10 - Long word 

All addressing modes except 10, 11, 12, 13, and 
14 can be used as a destination.* 



ADDX 



8, 16, 32 


Add 


CCR 


Extended 


XNZVC 





This instruction adds the source to the 
destination and leaves the result in the 
destination. The sign bit of the result is 
extended to fill the word. 



15 14 13 12 11 10 9 


8 


7 6 


5 4 


3 


2 10 


110 1 


Register 

R# 


1 


Size 





R/N 


Register 
R# 


Destination 
Register 


Source 
Register 



Register field R# designates any one of eight 
registers. 

If R/M = then a data register is specified. 
If R/M = 1 then an address register is specified. 









Size field: 00 - Byte operation 








01 - Word operation 








10 - Long word operation 


CLR 


8, 16, 32 


Clear an 


This instruction clears the effective address. 




CCR 


Operand 






XNZVC 








- 1 







15 14 1312 11 10 9 8 


7 6 5 4 3 2 10 


10 10 


Size Effective Address 
Mode 1 Register 



Size field: 00 - Byte operation 
01 - Word operation 
10 - Long word operation 

The following address modes cannot be used as 
destinations: 2, 10, 11, 12, 13, 14.* 



MICRObits 



Deadline for MICRObits: 20th of sec- 
ond month before publication; i.e., 
November 20th for January issue. Send 
typewritten copy (40-word limit) with 
$25.00 per insertion. (Subscribers: first 
ad at $10.00.) 

6800/6809 Software 

Includes compatible single-user, 
multi-user and network-operating 
systems, compilers, accounting and 
word processing packages. Free 
catalog. 

Software Dynamics 

2111 W. Crescent, Sta. G 

Anaheim, CA 92801 



Lessons in Algebra 

An easy and fun way to learn the 
basic elements of high school algebra. 
Apple computer diskette $29.95. 
30-day money-back guarantee if not 
satisfied. 

George Earl 

1302 So. General McMullen Dr. 

San Antonio, TX 78237 



PET Joystick Interface 

Connects directly to all PET/CBM 
computers. Allows PET to accept 
either Apple joysticks/paddles or 
Atari joysticks. No assembly required. 
Ready to plug into the user port. 
Software provided. Immediate 
delivery. Only $49.95. Michigan 
residents add 4% sales tax. 

J. Systems Corp. 

1 Edmund Place 

Ann Arbor, MI 48103 



OAI 65D V3.3 Guide 

Contains fixes and other data OSI 
didn't tell you about. Increase 
compatibility between 65DV3.X and 
VB.3. Run extended utilities under 
V3.3 and more. $14.95. New York 
residents add 7% sales tax. 

Buffalo Informational Technologies 

209 Richmond Avenue 

Buffalo, NY 14222 

VIC 20 Games — 5 for $10.00 

Tape 1: Canon Duel, Breakout, 
Runaround, Stockcar, Space Scout. 
Tape 2: Target Pistol, Space Duel, 
B29, Tank, Roadblock. Tape 3: Sub 
Hunt, Blockade, Indy500, UFO, 
Jungle Driver. Add $1.50 for p/h. All 
15 games for $25.00. 

Skylight Software 

22 Miller St. 

Belfast, ME 04915 



(Continued on page 30) 



28 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Table 1 (continued) 



Mnemonic Data Size/CCR Function 



Comments 



CMP 



8, 16, 32 
CCR 
XNZ VC 



Compare 



This opeiation subtracts from the destination 
the source; the destination is not changed. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 11 



Register 



Op iVIode 



Effective Address 
Mode I Register 



Register field defines the destination data register. 

Op Mode field defines the size of the data to be 
compared. 

000 - Byte 

001 - Word 
010 - Long word 

All but the Quick Immediate and Implied 
addressing can be used for an effective address 
13, 14.* 



CMPA 



16', 32 
CCR 
XNZ VC 



Compare This instruction subtracts the effective 

Addresses address from the destination and leaves 
the destination unchanged. 



15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 11 



Register 



Op Mode 



Effective Address 
Mode I Register 



Register field defines the destination address register. 

Op Mode field specifies the size of the operand. 

Oil - Word operator 
1 1 1 - Long word 

All effective addressing modes except the implied 
mode can be used. 



CMPI 



8, 16, 32 
CCR 
XNZ VC 



Compare 
Immediate 



This instruction subtracts the immediate 
data from the destination. The condition 
codes a set consistanr with the results of the 
operation. 



15 14 13 12 11 10 9 8 


7 6 


5 4 3 2 10 


110 


Size 


Effective Address 
Mode 1 Register 


Word data (16 bits) Byte data (8 bits) 


Long data (32 bits including previous word) 



Size field; 00 - Byte operation 
01 - Word operation 
10 - Long word operation 

The following destination effective addresses 
cannot be used: 2, 10, 11, 12, 13, 14.' 



CMPM 



8, 16, 32 
CCR 
XNZ VC 



Compare 
Memory 



This operation is used to subtract the 
source from the destination. The CCR is set in 
accord with the result. The contents of the 
destination are not changed. The addressing is 
always done using postincrement addressing. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 11 



Register 
Rx 



Size 



1 



Register 
Ry 



Rx must be an address register and in the 

destination. 

Ry must be an address register and is always the 

source. 

Only the Post Increment mode can be used. 



No. 54 - November 1982 



(continued) 
MICRO - The 6502/6809 Journal 



Ahatvestof 
savings front 




Electronics 



SOFTWARE 



APPLE' ATARI -TRSaO'E^i 

A full line of software for business, games 
and education Up tO 35% Off! 



MCJSE 


las 


VISICORP 


STOrSEWARE 


OMUNE 


aTNEROSnC 


EDG-WARE 


HAYDEN 


HOWARD 


AND MANY MORE 



HARDimRE 



AMDEK . HAVES • MtCROSOFT 

FRANKLIN COMPOTER 

SYSTEM 
ACE 1000 • $1,795.00 



DISKS 



Maxell Boxof]0,5'/4",SSDD $35.00 
Verbatim BoxoflO,5!/4",SS-DD $29.00 



MONITORS 



LE MONITORS 

9" Green 
12" Green 
ZENITH 

12" Green 



List 



$189.00 
$199.00 



Our Price 
$159.00 
$169.00 



$179.00 $129.00 



Plus a full line of AMDEK Monitors 



PRINTERS 



PAPER TIGER 

460G 
560G 
EPSON 

MX 70 
MX SOFT 
MXIOOFT 



Ust 



$1,094.00 
$1394.00 

$449.00 
$745.00 
$945.00 



Our Pr ice 
$950.00 
$1,250.00 

$395.00 
$595.00 
$795.00 



CALL FOR THIS AMWKS SBECtU / 

1-800835-2246 EXT. 211 

OR 

7024594114 



5130 East Charleston Blvd. 

Su«e5MI 
Las Vegas, Nevada 89122 



,.l 



Phone orders welcome. Mail orders may send 
charge card number (include expiration date), 
cashiers check, money order or personal check 
(allow ten business days for personal or com 
pany checks to clear). Add $3.00 for shippinq, 
handling and insurance. Nevada residents add 
5.75% sales tax. Please include phone number. 
All equipment is in factory cartons with manu- 
facturers warranty. Equipment subject to price 
change and availability. Call or write for price list 



29 



MICRObits 

(Continued fiom page 28) 

Elephant Disks 

514" SS/SD $21/box, SS/DD (48 TPI) 
$24/box, SS/DD (96 TPI) and DS/DD 
(48 TPI) $30/box, DS/DD (96 TPI) 
$36/box. Write for prices on 8". Add 
$1 per order shipping via UPS in USA, 
NJ add 5% sales tax. 

Baker Enterprises 

15 Windsor Drive 

Atco, NJ 08004 



SYM-1 Computer Plus 6502 Books 

SYM-1 assembled and tested, never 
used (original packing). SYM 
programming manual and reference 
manual included - $130.00. PMC (EMA 
5/6B) power supply - $19.95 (cable 
connection for SYM included). 6502 
software design [L.J. Scanlon) - $8.95 
new. Programming and interfacing 
6502 with experiments (M.L. Dejong) - 
$10.95 new. SASE: 

Frank Janda 

19 Wilson Drive 

Framingham, MA 01701 

(617) 862-3120 ext.209 



OSI Super Defender 

Play this great arcade game at home. 
All machine code includes: scanner,- 
smart bombs,- laser fire; moving 
mountains and more. Save your 
humanoids from the alien landers. Very 
smooth (half character moves) graphics. 
$14.95 for CI, 2,4 tape or 5i4" disk. 

DMP Systems 

319 Hampton Blvd. 

Rochester, NY 14612 



Commodore 64 Software 

Sprite Editor - $12, Dumb Terminal - 
$10, Disassembler - $15, Cross- 
Reference Generator for BASIC 
programs - $10. Descriptive catalogue - 
50 cents. Contact by US mail or 
CompuServe 70140,223. 

NEON SYSTEMS 

5108 N. 23rd Road 

Arlington, VA 22207 

The Wrath of Khan 

Can you defeat a Superman? Com- 
mand Enterprise in a tactical battle 
against the Reliant. Cl-P controls 
Reliant's maneuvers and weapons via 
Artificial Intelligence logic routines. 
Features full status display, sensors, 
photon torpedoes, phasers, deflectors, 
and more. Cassette 8K - $14.95 ppd. 

Cygnus Software 

791 W. Oakland Park Blvd. 

Suite 432 

Ft. Lauderdale, FL 33311 



(continued) 



Table 1 (continued) 

Maemonic Data Size/CCR Function 



Comments 



DIVS 16 Signed 

CCR Divide 

XNZVG 



This operation divides the destination 
by the source. The result is left in the 
destination. The source is a 16-bit word and 
the destination is a long word operation.The 
lower 16 bits are the quotient and the remainder 
is in the upper 16 bits,- the sign of the remainder 
is the same as dividend unless the remainder is 
zero. Division by zero causes a trap. Overflow 
may be detected and flagged but the operation is 
uneffected. 



15 14 13 12 11 10 9 8 7 6 


5 4 3 2 10 


1 Register 1 1 1 


Effective Address 
Mode 1 Register 



The register If specifies one of the eight data 
registers and this is the destination register. The 
effective address determines the sotirce and all 
EA modes can be used except 2, 14.* 



DIVU 



16 


Unsigned 


CCR 


Divide 


XNZVC 





The unsigned divide is identical to the 
signed divide except that unsigned 
arithmetic is used. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 



10 



Register 



1 1 



Effective Address 
Mode [ Register 



The addressing modes and the definition in the 
op word are the same as the signed divide. 



EXT 



16,32 


Sign 


CCR 


Extend 


XNZVC 




- . . 00 





This instruction extends the sign bit of a 
byte to a word or a word to a long word. 
The MSB is detected and extended to the proper 
length. The sign bit is considered to be the most 
significant bit of the word. 



15 14 13 12 11 10 9 


8 7 6 


5 4 3 


2 1 


10 10 


Op Mode 





Register 



Op Mode field specifies the size of the extension. 
010 - Word sign extension 
Oil - Long word sign extension 

Register Held specifies one of eight data registers. 



MULS 



16 

CCR 

XNZVC 


Signed 
Multiply 


- . . 00 





This operation multiplies two signed words 
together. The destination must be a specified 
data register. The sign of the operation is 
reflected in the sign bit. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



1 1 Register 



1 1 1 



Effective Address 
Mode I Register 



Register field specifies one of the diata registers 
and is a destination register. 

All effective addressing modes can be used 
except Direct, Quick, Immediate, and Implied 2, 
13, 14." 



MULU 



16 


Unsigned 


CCR 


Multiply 


XNZVC 




- . . 00 





This operation multiplies two 16-bit 

integers together and leaves the result in the 

destination register. The operations are similar 

to the signed multiply except that signed 

arithmetic is not used. The 32-bit result is left in 

the destination register. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



110 



Register 



1 1 



Effective Address 
Mode I Register 



Register field specifies one of eight data registers. 

The effective address can be anything but Direct, 
Quick, Immediate, and Implied 2, 13, 14,* 



30 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Table 1 (continued) 
Mnemonic Data Size/CCR Function 



Comments 



MEG 



8, 16, 32 
CCR 
XNZ VC 



Negate 



The destination is subtracted from zero. This 
changes the sign of the destination. The result 
of this operation is left in the destination. 



15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 10 



Size 



Effective Acbbess 
Mode I Re^ster 



Size field specifies the size of the data to be 
operated on. 

00 - Byte operation 

01 - Word operation 

10 - Long word operation 

Effective address modes can by anything but 2, 
10, 11, 12, 13, 14.* 



NEGX 



8, 16, 32 

CCR 

XNZVC 



Negate The destination is subtracted from zero and the 

with Extend result of the operation is left in the destination. 

The sign bit is extended to the end of the word. 

15 14 13 12 11 10 9 8 7 6 5 43 2 1 



10 



Size 



Effective Address 
Mode I Register 



Size field specifies the size of the operation. 

00 - Byte operation 

01 - Word operation 

10 - Long word operation 

The following effective address nuxies cannot be 
used: 2, 10, 11, 12, 13, 14.' 



SUB 



8, 16, 32 


Subtract 


CCR 


Binary 


XNZVC 





This operation subtracts the source from 
the destination and leaves the result in the 
destination. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 1 



Op Mode 



Effective Address 
Mode I Register 



Register field specifies any one of the eight data 
registers. 

Op Mode field defines the way that tie operation 
is to be performed between the data register and 
the effective address. 

Long 
Byte Word Word Operation 



000 001 010 



The data register is the 
destination and the £A is 
subtracted from the 
Register. 



SUBA 



16, 32 

CCR 

XNZVC 



Subtract 
Address 



100 101 110 The EA is the destination 
and the register is 
subtracted from (he EIA. 

The only effective address |EA) modes which 
cannot be used if the EA is a source are 13, 14.* 

If the EA is a destination tSen the following 
effective address modes cannot be used: 1, 2, 10, 
11, 12, 13, 14.* 

This instruction subtracts the effective 
address from the address register and 
leaves the result in the address register. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 1 



Register 



Op Mode 



Effective Address 
Mode [ Raster 



Register field specifies any one of the eight 

address registers. 

The Op Mode specifies the size of the operation. 

Oil - Word operation 

111 - Long word operation 

All effective address modes can be used except 
10, 11, 12, 13, 14.' 



MICRObits f, 



continued) 



VIslCalc To Apple Plot 

Interface translates from VisiCalc to 
Apple Plot, prevents erroneous graphs, 
fits curves to data, and supplements 
VisiCalc with rank ordering and 
alphabetizing. Send SASE for details or 
$30.00 for the copyable program. 

Bill Starbuck 

2100 E. Edgewood 

Shorewood, WI 53211 

(414| 963-9750 



VisiCalc To Apple Writer 

Veecee-Writer translated VisiCalc (/PF) 
files for Apple Writer 1. Send $15.00 for 
the copyable program. 

Bill Starbuck 

2100 E. Edgewood 

Shorewood, WI 53211 

(414| 963-9750 



AIM-65 FIG-FORTH 

Fig-Forth for your Aim-65 with 
assembler needs 16K memory. Cassette 
$20.00. With editor and assembler 
needs 32K memory $25.00. 

D. Holmes 

466 Palos Verdes Blvd. 

Redondo Beach, CA 90277 



0SI-C3B 

152K static ram, 70 MB disk, 160 1pm 
printer, dual 8" floppies, software, 1 
year old, used 2 months. $12,800.00 
US or best offer. 

Alan f. Lawson 

Toronto, Canada 

(416) 576-6508 



OSI C1 P Chomper 

Positively one of the most difficult, 
challenging, and fun dot-eating games 
available on the CIP. Progressively 
faster action, bonus characters, and 
"commercials" for high scores. 
Keyboard or joystick, 8K tape. $14.95 
includes shipping. 

Watts Ware 

153 Madrona Drive 

Anacortes, WA 98221 



Consulting Opportunities 

Learn how to become a successful 
consultant in your own field. Write for 
a free prospectus: 
The Consultant's Library 
815 15th Street, NW Dept. M. 
Washington D.C. 20005 

iSMCAO 



(continued) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



31 



Mnemonic Data Size/CCR Function 



Comments 



Announcing 

THE GUIDE 

A Complete Guide 
to the Apple Computer 




If You Own the Original 

What's Where in the 

APPLE? 

You Will Want 

THE GUIDE 

A Complete Guide 
to the Apple Computer 

only $9.95* 

The Guide provides full explanatory 
text to lead you through the most 
complete Apple memory map ever 
published! 

The Guide explains and 
demonstrates how to use the atlas 
and gazeteer published in the 
original volume! 

If you missed the first edition of 
What's Where in the Apple?, a new 

revised edition containing BOTH the 
original atlas and gazeteer AND the 
all new Guide is available in one 
256-page, Wire-0-Bound book for 
only $24.95! 

MICRO makes it easy to order: 
Send check (payable to MICRO) to: 

MICRO INK 
P.O. Box 6502 
Chelmsford, MA 01824 

Call our toll-free number: 

1-800-345-8112 

(In PA, 1-800-662-2444) 
VISA and MasterCard accepted 

'Add $2.00 shipping per book. 
MA residents add 5%. 

83-370 



SUB! 



8, 16, 32 

CCR 

X N Z V C 



Subtract 
Immediate 



This instruction subtracts the immediate 
data from the destination. The result of the 
operation is left in the destination and the 
proper bits are set in the CCR. 



15 14 13 12 11 10 9 8 


7 6 


5 4 3 2 10 


10 


Size 


Effective Address 
Mode 1 Register 


Word data (16 bits) Byte data (8 bits) 


Long word data (32 bits using previous word) 



Size field defines the size of the operation. 

00 - Byte operation data is the lower order byte 

of the immediate word. 

01 - Word operation data is the entire 

immediate word. 
10 - Long word operation data is the next two 
immediate words. 

The following addressing modes cannot be used: 
2, 10, 11, 12, 13, 14.* 



SUBQ 



8, 16, 32 
CCR 
XNZ VC 



Subtract 
Quick 



This operation subtracts the immediate data 
from the destination. The results are left in the 
destination and the bits are set in the CCR 
consistent with the results of the operation. 

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



1 ij Data I 1 



Size Effective Address 
' Mode I Register 



Data field contains the immediate data to be 
subtracted: Any integer from 1 - 7 can be 
represented and in the data field represents the 
integer 8. 

Size field determines the size of the operation. 

00 - Byte operation 

01 - Word operation 

10 - Long word operation 

The following effective address modes carmot be 
used; 10, 11, 12, 13, 14.' 



SUBX 



8, 16, 32 
CCR 
XNZ VC 



Subtract 

with 

Extension 



This instruction subtracts the source from the 
destination and leaves the results in the 
destination. The sign is extended. 
15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 



10 1 



Register 
Rx 



Size 



R/MJRegister 
Ry 



Size field specifies the size of the operation. 

00 - Byte operation 

01 - Word operation 

10 - Long word operation 



Rx 


R/M = 


R/M = 1 


destination 


data 


address 


register 


register 


register for 

predecrement 

mode 



Ry 

source 

register 



data 
register 



address 
register for 
predecrement 
mode 



data 
register 
to data 
register transfer 



memory to 
memory transfer 



TST 



8, 1 6, 32 


Test an 


CCR 


Operand 


XNZVC 




- . . 00 





This instruction compares the data defined 
by the effective address with zero. The 
condition code register is set to be consistent 
with the result of the operation. 
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 



10 10 10 



Size 



Effective Address 
Mode I Register 



00 - Byte operation 

01 - Word operation 

10 - Long word operation 

The following effective address modes cannot be 
used: 2, 10, 11, 12, 13, 14.' 



ilVlCftO 



32 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



.^i 



jJ^S^'i^ 



-'%: 



mg like it before. Nothing else like it now! 



. . brings you continuous Hi-Res action-animation in every adven- 
turous moment! And, real running, leaping, crawling. Real fighting, 
shooting, stabbing, dynamiting. Real w/ounding, poisoning, 
killing. Real action, excitement, mystery! All in a real-time 
challenging adventure that's the wave of the future! 



Paul Stevenson's graphic genius, first displayed m nis 
best selling "Swashbuckler" sword fighting game. 
h outdoes Itself in AZTEC. You're inside an ancient 

.PW: Aztec pyramid searching for the golden idol. 

Descend deep into the heart of the temple- 
meet cobras, scorpions, giant lizards, 
Jf hostile Aztec guardians and more, 'vVatch 

-■I for hidden trapdoors and strange death- 

rooms. Be ready to fight, or run. crawl or 
; jump to possible safety. The menace is 

real, the options and strategy are yours. 
You've never seen an adventure like 
Aztec! You'll never tire of its amazing 
action-animation and exciting challenge. 
'■;• S39,95fortheAppleir Atyour 

computer store or: 



^ 



■JfefeSB*--', 









■%& 



■L.<^^ 



•v^i 



'/,,^^^">%^ 



%S*»5"> 






UnW*^ 



The orcode-worp is open! 

YOU CAN RUN BUT CANT HIDE. YOU CAN KILL BUT CANT Ef 



Tubewoy! Ir's on insidious invasion re 

creored by beings fronn a porollel universe 

srronge, geonnerric universe. You're rrop 

, on rhe rinn as rheir fleer sworms our of rhe v 

on o voyage of 

quesr. The borrle isy 

alone— and ir's far fi 

, / easy because nor 

$::} ^^^ srroregy doesn'r w 

*i '\ . ... you hove ro figh 

f \ rheir srronge, geom 

rules! 

',. \ Here's rhe fosresnr 

,/>/ \ foscinoring of rhet 

J^y \ sryle space gomes 

j'y \ involving and excirin 

^/ ' . \ desrined ro beconn^ 

y*^^ ' \ oll-srar, oil-rime hir. 

///jf" \^ oneofrhefirsrroroki 

\ rhe challenge of 
^.gggsp'Z^ \ lighrfosr Tubewoy! 

""''"^'^ \ S34.95for.fheAppl€ 
|c . \ Aryourcompurersrc 




//-- 




How to Make a Graphic-80 
PET from a 40 1 6 



by James Strasma 



A "Graphic 80" is an 80-column 
PET with the graphic-style 
keyboard. It can be made from a 
4016 (Commodore's cheapest 
PET) by adding some 
inexpensive, readily available 
iCs and moving some jumpers. 
The author provides step-by-step 
instructions, in addition, 
instructions are provided to add 
extra keys to an 8032 or a 
Graphic 80. 



The CBM 8032 offers an 80-column 
screen and a very business-oriented 
keyboard. Many PET owners would 
like to have the 80 columns, yet still 
maintain the easy access to graphic 
characters that the "graphic" keyboard 
offers. This does take some soldering 
and electronic assembly skill. 

This article shows how to upgrade a 
"Fat Forty" 4016 or 4032 to a graphic 
keyboard, 80-column machine. There 
are several options available, including 
only upgrading to 32K, making a 
business-keyboard 8032, and adding ex- 
tra keys to control video functions not 
previously accessible from a single key. 

Before you begin, note that these 
changes are for ASSY. NO. 8032089, 
located on the right edge of the board, 
halfway back, the FCC-approved Uni- 
versal Dynamic PET main board. Simi- 
lar changes worked with earlier boards, 
as long as the computer came with the 
large, 12-inch screen. 

Also note that procedures described 
below void any Commodore wanantee, 
guarantees non-support by them, and 
cannot be guaranteed to work on your 
particular machine. 

The traces on current PET com- 
puter boards are very tiny, and easily 
destroyed. Do not attempt this project 
unless you are skilled with a soldering 
iron. Before you start, unplug your 
machine for your safety and the 
computer's. 

Install sockets where new chips are 
added. This makes the job easier and 
makes later repairs more convenient. 



To make a 4032 from a 4016 
D Insert 4116 dynamic RAM chips 
in the vacant positions of column UA. 
These include UA4, UA6, UA8, UAIO, 
UA12, UAH, UA16, and UA18, eight 
in all. 

D At the right front of the board, 
find the right end of jumper Y, and re- 
route that end to the next hole toward 
the rear, at the right end of a line labeled 
Z. (See figure 1.) Your PET will now 
display "31743 bytes free" when it is 
powered on. If it doesn't, check your 
connections. 

To make an 80-column machine 
from a 4032 

D Move the right end of all ten 
jumpers at BAO one hole to the rear. 
(See figure 2.) 

D Just behind jumpers Y and Z, 
move the right end of the jumper labeled 
both 3 and 40 one hole to the rear, the 
right end of the line marked 4 and 80. 
(See figure 1.) 

D Remove the short between pins 
10 and 11 of UD2 from the bottom of 
the board, and repair those pins' con- 
nections on the top side of the board. If 



you damage this chip, it can be inex- 
pensively replaced. (UD2 is the chip in 
the upper-left of figure 1.) 

D Remove the jumpers at 6 and 7 
between UB2 and UC3. (See figure 3.) 

D Add jumpers at 5 and at 8 in the 
same area (figure 3). The jumper at 8 
shoud be between the most widely 
separated of its four holes. 

n Add 2114 static RAM chips at 
UC6 and UC7. 

D Add 74LS244 octal tri-state 
driver chips at UB6 and UB7. 

n Add a 74LS373 tri-state octal D 
flip-flop chip at UB8. 

D Replace the 2K ROM at UD7 
with a suitable replacement, as de- 
scribed in the next section. 

To make the result a business- 
keyboard 8032 

n Buy or program a ROM for UD7 
identical to the one supplied in that 
position on the 8032. Commodore's 
part number is 901474-03. The correct 
EPROM substitute is a single 5-volt 
supply 2716. 

D Buy and install a business- 
keyboard in place of the graphic one 



Figure 1: Detail of front of board showing positions of Jumpers Y, Z, 3, and 4, and IC 
UD2. 



SN7itLSlGH 




No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



35 



supplied. Since the cutouts will not 
match, the lower portion of the hood 
should be replaced, or you can make 
your own mounting plate. 

To make the result a G80 

D Create a custom 2716 EPROM 
for UD7, or obtain one from a user 
group. The only change is to take the 
80-byte keyboard look-up table from 
locations $E798-$E7E7 in the Fat Forty 
ROM, and copy it into the functionally 
equivalent location in the 8032's ROM, 
starting at $E6D1. With this change, 
the G80 will lack only the REPEAT, 
ESCAPE, and TAB keys of the 8032. 

However, as long as you have made 
the decision to modify the ROM, why 
not improve it? By changing only a few 
bytes, you may add not only the miss- 
ing keys, but also up to four others. 

Listing 1 shows my keyboard look- 
up table, which includes keys for 
TEXT/GRAPHICS, INSERT/DELETE 
LINE, ERASE TO BEGIN/END, and an 
optional value for SET TOP/BOTTOM 
OF SCREEN. The details are described 
later in the article. 



Adjusting the Screen 

There is a slight problem with the 
video adjustment that appears when 
CHR$(14) is printed. The top and bot- 
tom lines disappear! To fix this, adjust 
the potentiometer labeled HEIGHT, 
from below the video display board, 
using a small non-conductive screw- 
driver. Bear in mind that parts of this 
board carry over 10,000 volts, even 
when the computer is unplugged! 

Using the program below, adjust the 
pot so the test pattern just fills the 
screen: 

10 PRINT CHR$(14) 
20 FOR 1 = 1 TO 1999 
30 : PRINT"*"; 
40 NEXT 
50 GOTO 50 

The same fix works on any Fat Forty. 

To add missing and extra keys pull 
off the keyboard connector at the 
keyboard. Note that it has 18 separate 
connections. These correspond to the 
ten rows and eight columns of the key- 
board matrix as shown in listing 1. 

There is a small hole at each posi- 
tion in this connector. Using micro test 
clips available from Radio Shack, you 
can make temporary connections. 

For a slightly more permanent at- 
tachment, I soldered tiny loops of wire 
to the keyboard side of the connector, 
as shown in figure 4. From the right 
edge of the keyboard connector, as 
viewed in place, the ten rows of the 
keyboard matrix are the first ten wires 
from the right. The eight columns of 



Listing 1 


















.: E6D1 


3D 


2E 


10 


03 


3C 


20 


5B 


12 




E6D9 


2D 


30 


00 


3E 


19 


5D 


40 


00 




E6E1 


2B 


32 


OE 


3F 


2C 


4E 


56 


58 




E6E9 


33 


31 


OD 


3B 


4D 


42 


43 


5A 




E6F1 


2A 


35 


IB 


3A 


4B 


48 


46 


53 




E6F9 


36 


34 


15 


4C 


4A 


47 


44 


41 




E701 


2F 


38 


16 


50 


49 


59 


52 


57 




E709 


39 


37 


5E 


4F 


55 


54 


45 


51 




E711 


14 


11 


09 


29 


5C 


27 


24 


22 




E719 


ID 


13 


5F 


28 


26 


25 


23 


21 



Figure 2: Detail stiowing jumpers BAO - BA10 and position of replacement EPROIM at 
UD7. 




Figure 3: Detail showing jumpers 5, 6, 7, and 8. 




36 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



I ■ J I 




Figure 4: Added loops at keyboard 
connector and clip connections. 

the matrix follow, again toward the 
left. 

The six keys I have added are all in 
column 3 of listing 1 . This corresponds 
to the thirteenth wire from the right. It 
is the one with two micro test clips in 
figure 4. Each of these wires connects 
to one pole of an added key (or push 
button, as I implemented it). 

Rows 1, 3, 5, 6, 7, and 9 contain the 
added keys. Connect each one to the 
unused pole of the appropriate added 
"key." One more key could be added 
by attaching wires to row 2 and column 
5. These correspond to positions 2 and 
15 from the right end of the connector, 
and would be mated through another 
key. 

If you prefer to implement another 
keyboard value, substitute your prefer- 
red PET ASCII value into the keyboard 
look-up table of listing 1. For instance, 
if you replace the $03 at location 
$E6D4 with $07, then hitting the STOP 
key would ring the chime rather than 
halting running programs. 

I chose to mount push buttons 
through the bezel surrounding the 
video screen, as shown in figure 5. I 
used Radio Shack's tiniest push but- 
tons because they are unobtrusive, 
easier to push than large ones, and I 
couldn't find regular keyswitches. 
Regular keyswitches could be used, or a 
surplus keypad could be wired up. 

One method for making the G80 



Figure 5: Micro push buttons added near 
screen. Three additional buttons were in- 
stalled on the other side. 

selectable between 40 and 80 columns 
requires three ICs to switch the neces- 
sary lines. This plan offers a simpler 
solution. It uses a 2732 EPROM, pre- 
programmed to mimic any two BASIC 
4.0 ROM sets, and switches from one 
to the other by grounding one pin. 

The disadvantage of this method is 
that the 40 columns appear smaller and 
centered on an 80-column screen, 
rather than occupying the full width, as 
on a Fat Forty. 

For information on how to obtain 
this chip, see the box on this page. 

Software Compatibility 

Nearly everything for the 8032 also 
works on the G80, especially after ad- 
ding the missing keys. This includes 
the 8096 memory expansion board, 
Silicon Office, COMAL, and VisiCalc 
8096. The exceptions are complete 
languages, including UCSD Pascal, the 
former PET BASICs supplied with the 
8096 board, and A.B. Computer's "Ex- 
panded BASIC" for the 8096. By modi- 
fying the programs, I have been able to 
get all but UCSD Pascal to work with 
the G80. 



You may contact the author at 1280 
Richland Ave., Lincoln, IL 62656. 

ilMCftO 



Obtaining Alternate ROMs 

To order alternate ROMs for Commodore 8032 and G80 computers, write: 

Jim Russo 

Ann Arbor Terminals, Inc. 

6175 Jackson Road 

Ann Arbor, MI 48103 
You may request any two of the following variations of BASIC 4: 
Fat Forty (Current model, but centered on an 80-column screen.) 
Skinny Forty (Also centered; works with far more games. No repeat function.) 
Eighty (Same as the 8032.) 

Be sure to specify whether the ROM is for a G80 or an 8032. I think the 
charge is still $10 per ROM, barely above the cost of the 2732 itself. 



ANDROID 
ATTACK 

i-oR J^ ATARf 




Fight your way doNn through the 
Top-Secret underground labor»tory 
to save the runaway nuclear 
reactor, then try to save yourself 
before the Androids get youl 

16K cassette, 32K disk (SPECIFY!) 

Ask for ANDROID ATTACK at your 
local dealer or send $18.95 + %2,U 
shipping. Nrite for our illustrated 
list of gaies for your ATARI. 

F>RE:-r z E:i_i_^iNir> 
s o F^ T uj #=* R e: 

2005 D WHITTAKER RD 
YPSILANTI, MI 4S197 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



37 



/MCftO 

CoCo Bits 



By John Steiner 



Ed. note: This is the fiist of oui Color 
Computer columns. John will be 
augmenting oui coveiage of 6809 com- 
puters and helping to recruit authors. 



This column will have two major goals: 
to provide news about the TRS-80 Col- 
or Computer, and to provide a clearing- 
house for CoCo information. In addi- 
tion, I hope to pass along any informa- 
tion on the 6809, the 6847 video 
display generator, and the other major 
components CoCo has. 

Originally, it seems, Tandy devel- 
oped CoCo to compete with Atari, the 
VIC 20, and other game machines of 
similar style. Witness the use of ROM 
program packs for games, etc. This em- 
phasis seems to be changing slightly. 
Just recently, Tandy has taken the 4K 
machine off the market and replaced it 
with a 16K version, at the same price. 
With the addition of the 32K upgrade 
(which uses 64K chips), CoCo has 
entered a new world. The newer, more 
powerful machine has been easily con- 
verted to 64K and given the capacity to 
run FLEX. OS-9 will probably be 
available by the time you read this. 
These two powerful operating systems 
allow a vast range of 6809 software to 
be executed from CoCo. As I learn 
more details of these CoCo expansions, 
I will pass them along. 

Since this is the games issue, I have 
some game-oriented information this 
month. If you have a Color Computer 
disk system, you have no doubt been 
frustrated by the fact that the CoCo 
DOS scratchpad is located at $600, just 
where many machine-language tape 
programs like to reside. I am grateful 
that Tandy has started releasing some 
software on tape since disk users have 
trouble getting the disk drive and a 
ROM pack in the ROMport at the same 
time. It is a shame, though, to have to 
spend several minutes loading a 14K 
adventure game from tape, when that 
expensive disk system just sits there 
taking up space. 

I purchased "BEDLAM," an adven- 
ture game on tape, and decided I would 
have to transfer it to disk. Being a 



relative beginner to machine-language 
programming and only having experi- 
ence with the 6800, 1 have been waiting 
for Tandy's assembler (though others 
became available, I had a deposit on 
Tandy's]. When it finally arrived, I 
plugged in the EDTASM -i- ROM pack 
(doggone it, there went the disk again), 
and loaded BEDLAM using an offset of 
16384. Using the monitor, I found the 
start and end addresses, and tacked a 
little routine at the end. This routine, 
shown below, moves the program, one 
byte at a time (I forgot about the D 
register) down to $600. It then transfers 
execution to $600, the start address of 
BEDLAM. 

You may enter and assemble the 
listing yourself, or enter the object code 
from the assembler listing using a 
monitor. Once the routine is in place, 
beginning at $7F02, use CLOADM 
"BEDLAM", 16384 to load in 
BEDLAM. Transfer the whole thing to 
disk with the command SAVEM 
"BEDLAM", &H4600, &H7F15, 
&H7F02. Notice the execute address is 
the start address of the memory move 
routine. To run the program, you can 
just use LOADM "BEDLAM" : EXEC, 
or you can write a BASIC load routine, 
and let BASIC do the work for you with 
a simple RUN "BEDLAM". 

Once the program has been loaded 
into the region at $600, disk BASIC is 
essentially gone. The quick and dirty 
method to restore DOS is to shut the 
computer off, then turn it on again. A 
better way is to let RESET do it for you. 



CoCo BASIC has two options in its 
reset routine: a cold start and a warm 
start. When RESET is pressed, memory 
location 113 is checked for $55. If 
found, a warm start is done, any pro- 
gram in memory is saved; string 
memory, number of graphics pages 
reserved, and other parameters are 
kept. If, on the other hand, anything 
but $55 appears, BASIC assumes a cold 
start and reconfigures the system to 
power up status. This little trick will 
recover our disk when we are through 
with BEDLAM. Before loading the pro- 
gram, from BASIC enter POKE 113,0. 
Alternatively, you could add a routine 
at the beginning of the machine-lan- 
guage loader that will store a zero into 
location 113 before executing BED- 
LAM. When you are ready to quit 
BEDLAM, just press RESET. DOS will 
be reconnected. You will not be miss- 
ing any fancy end routine by leaving 
BEDLAM in this manner. 

A quirk of this and the other Radio 
Shack adventure games I've seen is 
their STOP or QUIT command. I would 
have expected control to return to 
BASIC. What happens is that the key- 
board will lock up, causing you to turn 
off the computer or press RESET to 
regain control. As long as you have to 
press RESET anyway, you might as 
well reconnect the disk. Though not 
particularly fast or fancy, you can use 
the routine on any 32K machine to 
transfer programs. Just substitute the 
correct start, end, and execute ad- 
dresses where required. 







• 


ORG 


$7F02 








•PROGRAM TO MOVE BEDLAM 


* 






•JOHN STEINER 8/1/82* 




7F02 8E 


4600 


START 


LDX 


#$4600 


Load current start address 


7F05 108E 


0600 




LDY 


#$600 


Load new start address 


7F09 A6 


80 


MOVE 


LDA 


,X + 


Load byte from current address 


7F0B A7 


AO 




STA 


,Y + 


Store byte to new address 


7F0D 8C 


7F01 




CMPX 


#$7F01 


Done yet? 


7F10 26 


F7 




BNE 


MOVE 


If not go do it again 


7F12BD 


0600 




JSR 

END 


$600 





38 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



CoCo Bits 



(continued) 



One more programming hint for 
this month. Disk users are told by the 
disk system manual that "COPY" is 
available for only multi-drive users. 
This is incorrect. If you have a single 
disk drive, you can enter COPY 
"filename/ext". You will be prompted 
as to when to switch disks. In addition, 
unlike BACKUP and DSKINI, COPY is 
non-destructive of the program in 
memory. If you have a long program in 
memory and a large file to copy, how- 
ever, you may have to switch disks a 
couple of times. COPY can be used to 
transfer any file type, and easily 
transfers machine-language or data 
files. I will have more details on COPY 
next month, including a small routine 
that assists in selective disk backups. 

I am an electronics instructor by 
profession, and would like to make a 
couple of comments on CoCo in school. 
Tandy is developing courseware that 
runs on the Color Computer. CoCo 
will be making appearances in class- 
rooms around the country if Tandy has 
anything to say about it. By the time 
you read this, teachers will have access 
to programs such as Chemistry Simula- 
tions. Radio Shack's Talk/Tutor 



development system is the medium for 
several recently released educational 
packages, including Vocabulary Tutor 
I, and Inventions That Changed Our 
Lives. Talk/Tutor programs make good 
use of the high-resolution graphics and 
audio features of CoCo. 

In addition to these and other 
educational software. Color PILOT will 
have been released. PILOT has been 
used by many instructors who wanted 
to develop computer-assisted instruc- 
tion, yet did not want to learn the com- 
plexities of BASIC. Color LOGO, 
another popular language with educa- 
tors, should also be available. Both pro- 
grams will have disk versions; LOGO 
will also be on ROM pack. 

I am looking forward to comments 
from readers. I plan on including pro- 
gramming hints, and CoCo- and 
6809-related news. In addition, CoCo 
disk users are probably a distinct 
minority and I will have information 
on Color BASIC and Extended BASIC, 
as well as disk BASIC. I can be reached 
at 508 Fourth Ave. NW, Riverside, ND 
58078, or contact me through MICRO. 

AMCftO 



AT LAST... rin I 
...mR|JE]( 

For investors 

and financial managers 

Stock portfolio analysis 

S150.00 

•in your office - instant valuations 

•compound growlti measurement 

•pertinent company operating statistics 

Stock financial 

statement analysis 

5250,00 

•input your interpretation 

of financial data 

•analyze up to 10 years of data 

•see mean, trend and stability 

On-line data retrieval 

S50,00 

Accounting package 

S 150,00 

DBM system 

S 200.00 

for 8" floppy/hard disc 

under OS65U 

^^. Full Screen Editor 

^ for Polled Keyboard 

S75,00 

•for OS65D & OS65U 

•mact~iine language based 

•type or cursor mode 

write for details 

Genesis Information 
System^, Inc. 

P,0, Box 3001 • Duluth, MN • 55803 
Phone 218/724-3944 



Perry PERiphERAls RepaIrs KIMs!! 

(SYlVIs ANd AIMS Too) 

• We will Diagnose, Repair, and Completely Test your Single Board Computer 

• We Socket all replaced Integrated Circuits 

• You receive a 30-day Parts and Labor Warranty 

• Your repaired S.B.C. returned via U.P.S. — C.O.D., Cash 

Don't delay! Send us your S.B.C. for repair today 
Ship To: (Preferably via U.P.S.) 

Perry PERiphERAls 

6 Brookhaven Drive 
Rocky Point, NY 11778 

KIM-1 Replacement MocIuLes 

• Exact replacement for MOS/Commodore KIM-1 S.B.C. 

• Original KIM-1 firmware — IK and 4K RAM versions 

Replacement KIM-1 KEyboARds 

• Identical to those on early KIMS — SST switch in top right corner 

• Easily installed in later model KIMs 

Perry Peripherals is an authorized HDE factory service center. 

Perry Peripherals carries a full line of the acclaimed HDE expansion components for you KIM, SYM, and AIM, 
including RAM boards. Disk Systems, and Software like HDE Disk BASIC V1. 1. Yes, we also have diskettes. For 
more information write to: P.O Box 924, Miller Place, NY 11764, or Phone (516) 744-6462. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



39 




BOX 120 

ALLAMUCHY, N.J. 07820 

201-362-6574 



HUDSON DIGITAL ELECTRONICS INC 

THE TASK* MASTERS 

HDE supports the *TIM, AIM, SYM and KIM (TASK) with a growing line of computer programs and 
peripheral components. All HDE component boards are state-of-the-art AVi" x BV?", with on board 
regulation of all required voltages, fully compatible with the KIM-4 bus. 



OMNIDISK 65/8 and 65/5 

Single and dual drive 8" and 5V4" disk systems. 
Complete, ready to plug in, bootstrap and run. 
Include HDE's proprietary operating system, 
FODS (File Oriented Disk System). 



HDE DISK BASIC 

A full range disk BASIC for KIM based systems. 
Includes PRINT USING, IF . . . THEN . . . ELSE. 
Sequential and random file access and much 
more. $175.00 



DM816-M8A 

An 8K static RAM board tested for a minimum of 
100 hours and warranted for a full 6 months. 



HDE ADVANCED INTERACTIVE 
DISASSEMBLER (AID) 

Two pass disassembler assigns labels and con- 
structs source files for any object program. 
Saves multiple files to disk. TIM, AIM, SYM, KIM 
versions. $95.00 



DM816-UB1 

A prototyping card with on-board 5V regulator 
and address selection. You add the application. 



HDE ASSEMBLER 

Advanced, two pass assembler with standard 
mnemonics. KIM, TIM, SYM and KIM cassette 
versions. $75.00 ($80.00 cassette) 



DM81 6- P8 

A 4/8K EPROM card for 2708 or 271 6 circuits. 
On board regulation of all required voltages. 
Supplied without EPROMS. 



DM816-CC15 

A 15 position motherboard mounted in a 19" 
RETMA standard card cage, with power supply. 
KIM, AIM and SYM versions. 



DISK PROGRAM LIBRARY 

Offers exchange of user contributed routines 
and programs for HDE Disk Systems. Contact 
Progressive Computer Software, I nc. for details. 

AVAILABLE DIRECT OR 



HDE TEXT OUTPUT PROCESSING SYSTEM 
(TOPS) 

A comprehensive text processor with over 30 
commands to format and output letters, docu- 
ments, manuscripts. KIM, TIM and KIM cassette 
versions. $135.00 ($142.50 cassette) 

HDE DYNAMIC DEBUGGING TOOL (DDT) 

Built in assembler/disassembler with program 
controlled single step and dynamic breakpoint 
entry/deletion. TIM, AIM, SYM, KIM AND KIM 
cassette versions. $65.00 ($68.50 cassette) 

HDE COMPREHENSIVE MEMORY TEST 
(CMT) 

Eight separate diagnostic routines for both 
static and dynamic memory. TIM, AIM, SYM, 
KIM and KIM cassette versions. $65.00 ($68.50 
cassette) 
FROM THESE FINE DEALERS: 



Progressive Computer Software 
405 Corbin Road 
York, PA 1 7403 
(717)845-4954 



Johnson computers 

Box 523 

Medina, Ohio 44256 

(216) 725-4560 



Lux Associates 
20 Sunland Drive 
Chico, CA 95926 

(916)343-5033 



Falk-Baker Associates 

382 Franklin Avenue 

Nutley, NJ07110 

(201)661-2430 

Laboratory Microcomputer Consultants 

P.O. Box 84 

East Amherst, NY 14051 

(716)689-7344 



Perry Peripherals 

P.O. Box 924 

Miller Place, NY 11764 

(516)744-6462 



GAMES FEATURE 



Castle Adventure 
for PET and Apple 



by David Malm berg 



Castle Adventure Is a role- 
playing game that Involves 
traveling throughout a 
dangerous castle in search of 
treasure. The goal Is to rescue 
the princess, while avoiding the 
many dangers about you. 



Castle Adventure 

requires: 

PET/CBM with 32K 
or Apple II with 48K 
or other Microsoft BASIC 
computer 



In CASTLE ADVENTURE you play the 
role of Godfrey de Goodheart, a bold, 
but impoverished knight. King Fredrick 
in has dispatched you to rescue his only 
daughter, the beautiful Princess Fatima, 
from the dungeons of Baron von Evil's 
castle. You have also been asked to cap- 
ture the Baron's treasures of gold, 
silver, and gems, which he enmassed 
by cruelly exploiting his serfs. If you 
can rescue the princess and return with 
all of the Baron's ill-gotten treasures. 
King Fredrick has promised you Prin- 
cess Fatima' s hand in marriage. 

Your quest will be filled with peril. 
The seven lone knights who were 
previously sent on this crusade all 
vanished without a trace. If you are to 
succeed where so many others have 
failed, you must use all your strength 
and cunning — and be very lucky! 

During your quest the computer 
will be your guide. You take action by 
giving the computer a series of one- or 
two- word commands, such as: GO 
SOUTH (or just "S"), OPEN DOOR, 
GET KEYS, LEAVE CHEST, SWIM. 
The computer has a vocabulary of only 
about 100 words. If it does not under- 
stand your command, try something 
else. A complete list of this vocabulary 



is purposely not included. At least half 
the fun will be establishing the com- 
puter's lexicon. Several commands will 
be particularly useful: 

• INVENTORY (or just "I") will give 
you a list of all the items you are 
carrying. 

• LOOK (or just "L") may reveal 
significant details that may help you 
in your quest. 

• HELP (or just "H") may result in a 
valuable hint. 

• SAVE will cause the current status of 
the game to be saved on tape or disk. 

• LOAD will enable you to resume a 
previously saved game. 

• SCORE will show you the total num- 
ber of points you have earned so far. 

• QUIT will end the game and show 
you your final score. 

Remember that everything you en- 
counter in your adventure has a pur- 
pose. There are plenty of clues, but it 
will take imagination, perseverance, 
cunning, skill, and most of all luck to 
win the Princess's hand. 

Converting to Other Computers 

CASTLE ADVENTURE, as shown 
in listing I, is written for a 32K 
PET/CBM computer. Listing 2 shows 
changes required for an Apple II. 
However, the program is written in 
"standard" Microsoft BASIC, so con- 
version to other Microsoft machines 
should be a relatively trivial task. 
There are only three areas where 
changes to the program will have to be 
made. 

First, you will have to replace the 
screen and cursor control commands of 
the PET. These are shown in the listing 
within square brackets in their 
"English equivalents" so their mean- 
ing should be fairly obvious,- i.e., CLR 
means clear the screen, 3 DOWN 
means move the cursor down three 
rows, etc. CASTLE AI3 VENTURE is 
written for a 40-column screen, so no 
spacing changes will be required for the 



Atari (with Microsoft BASIC] or other 
40-column systems. 

The second change is to convert the 
LOAD game (lines 24 to 36) and SAVE 
game (lines 219 to 233) routines so they 
will be compatible with your 
machine's tape and/or disk command 
formats. The variables you want to 
SAVE and LOAD are: SF, LX, DF, R, 
and the array IA(.), which has IL 
elements (including a zero-th element). 

The last thing to change is the 
reference to the PET ROMs in line 390. 

Acknowledgement 

Many of the ideas in CASTLE 
ADVENTURE, as well as other adven- 
tures that are widely available, owe a 
tremendous debt to Scott Adams. In the 
specific case of CASTLE, it uses a data- 
base structure and table-driven logic 
similar to those first described by 
Adams in several articles. These 
articles are a must for the true 
adventurephile: 

l."An Adventure in Small Computer 
Game Simulation," Creative Com- 
puting, (August 1979). Describes the 
data-base structure. 
2."Adventureland," Softside, (July 
1980). Describes the table-driven 
logic. 
3. "Pirate's Adventure," BYTE, 
(December 1980). Also describes the 
table-driven logic. 

Castle Adventure listing begins on 
page 42. The changes for Apple II 
(listing 2) are on page 46. 



David Malmberg is the author or co-author 
of several personal computer packages; the 
most recent is VIC Turtle Graphics 
published by Human Engineered Software. 
You may contact him at 43064 Via 
Moraga, Fremont, CA 94539. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



41 



GAMES FEATURE! 



u 

_1 



If) 



I- 
o 






O 



a 



I Q 
il 1-. 



:: Jl 
II X 



I- I— 

= U 
= J 
II 

^■O 
S I- 
vr 

ft -^ 
)- II 

Z X 

8 q: 
n o 



II E 

i II 

z i: 
u 

r z 

I- ■<• u 

••j r 
= t- 

z 

= u = 

II r * 

*> I- = 
■£ II 



II ^ 

X X 

^_' ^' /-■. 

*t <ft z 

I- I- _i 

Z L- ^ 

11. -1 r 

•■ L. <* 

© >-i I- 

■^ II ■• U. 

z -^ -^■- u 

_l >C >C _l 

K -^ K II 
** ^ > -1* 
i: z ^-•i: 
+ •• <* 
-^ ^ i^ z 
r Z Ul 
--■ o II r 
*>(-*►(- 

I- X 
z © " K 
^^ n _l V 
*> X z ;■- 

I- 

li. Ct O Q 

U O I- Z 

-I II. U 

II ■- o 

^. X II « 

ac > II 

^K X 

*> X Lt 

t- Id O li. 

Z Z L. •- 



z 
a 

t- 
u 
a 

© 

D II 
•.3 L. 



I- II I- 

i~.- ii »-< 

.J il : 

- Z I- 

I uj r 

■^ I z *^ 

X I- a oc 



z: V u z 

II ■"■ Lt u 



o ; 

u £ ' 

I '"■• 

I- Q 
t- 
= II 
* -^ 
= Q 

II -w 



Q <Z 
Z "^ 
IZ 

o 

© z 

'MI 



u 

r 

■O 

ac O 
II I- 
^ O 
X O 

*» > 
I- 

Z I- 

X 

II. u 



X I- 

-^ II 



v^li. 

¥t -• 
t- •■ 
II. X 

u 
_l I- 

X 



I* v 
I- -^ 
z c^ 

^-' v^ 
Z II 
UJ i-i 



o 

I- 
o 
■J 



Cl 



a. 



II 

N 



= Ii 1.1 

II ^.- 

•^ ** z 
- in u 
'■a r 



- u 

vr 
^ I- 
© 

^--ii. 
z- a 
z 

II L. 



Ml i-i 

a 

«^ Ii 
z t- n 
Ii u. 
=i u D 
I- -I o 
kJ > 

au.- 



k. © 

-< II 

■• i 

_i ■■ 



U I » 
U II ct 
(0 i: n 



o u 
I- a 
u 
© r 
II 

z 

O I- 



a. 

t- 



I- 

b. 

U 
_l 
II 
«^ 
Q. 
t- 



U 

r 
I- 



Ii Q. 

I- 



Z 



/^. 1 
^ Ii 

■ u 

WI- 
LL If! 

I- 

v> 

t- c 
r I- 
>j 

i-i ^1 
Ii I 



B •'3 r- (0 <>■ s « c^ ro * m ij 

10 U5 U> U> ll> ''D *0 *0 <! ij *C' '0 



l\ 0) {>■ 

**? *»!' <! 



II. «^ Z 
•-< a Q: 
■■ I- D 
.". >^ H 
N Z bJ 
-^ u o: 
in «t _i ■• 
N d II '^ 3 
M 2 ^ 

OH I I- 

I- *Ki 2 X 

OHO "' kJ 

I O I- L. J^Z 

Q « iM 

r, ^ N 






U 

_l 
ft + 

r- --• 

e 

z ^^ 

Id u'l : 

r o 
I- a. 



o 



Ii 
a 

I- 
z 
»-* 
a 
a. 

z 

kJ 



t 



+ 



© 

II © 

t II 

11. .N 



X 



O 



Z >^ 

Ii H^ 

Zi >-i D 
I- lA 

U k. O 

CC •-< <J 



= II 

•■• I- N 
<*Z 

Ii » a 

1- a O 

a. k. 
I_ .. .. 

Z I- « 

M X I 

q: u II 

Q.Z. X. 



Cl Z. 

Q. I- 

kl 

z q: 
kJ ■■ 
r I- 
1- z 

©so; 

II /^ Q. 

X V " 

•- ^K 

= N Z 

•• a a 

Wl >^ Q. 

I- r •• 
M a (- 

X X 
kJ k. kJ 



II © 
: © 3- 



z ^: 

•« .i. ^ 

k. D « -r^ 
►H II + 

•■ C-J Z © 

© 3 u © 

II ■■ r •■-• (M 

k_ -^ ^ 
.. © © ^ o 

^ >^ x^. *.' K 

I 2 VQ 

II Z ^. Z N 

ii. -^© a -1 

■. ^; ^^ ^ II 

-• -• 3 I- X 

I -I z z 

II II >-• CL 
N N k. II Cr 
k. _l M r> k. 



© Z 
-^ kl 

r> r 

z I- 

» 

© o 

\f> I- 

« II 

II ^ 



in 
o. 

z 
u 

r 
I- 













o 

I- 



z 
o 



o 



>^ ^1 



u 

r 
I- z 

^a 

X Zi 

^:kJ 
© a 
o •■ 

II X 

:> I- 

X 

k. kJ 
•- Z 



:> ct 
z o 

» 

© (3 

in I- 
« II 
+ ^ 
-^ © 

3 z 
z 

II k. 
z •- 



© 

o 
II 
:> 0. 

ri a « 

o 
o '^ o 
I- X I- 

^^ o 
_i © ■• 

BOX 
X II 

Z I- 

a X 

O k. kJ 

k- •- z 



in 

8 



8 
M 



n « •« « 
k. © © © 

© ■" " ■" 

II o o o 

k. I- I- I- 

•■ o o o 

« (J 13 J 

I 

II -^ -^ ^ 
M X X X 
k_ >^ ^-' N-' 

•■ ^: ^.• ;-: 

— — N F> 

n o o o 
-4- H n a 

k. 3 2 2 



•^ — I 

©82 
-• — II 

O O ~ 
I- \- ^■ 
O O 8 
<J O M 
~ ~ X 
^ >^ 2 
X X ^ 
\«' >^ K 

^:^:z 

O II 

1 ■ -I 

5 2_l 



r 
I- 



« « k. 

T-l K I-I 

0. - _i 

Q « ►. — 

« ■ c< 

•■ Uj © O •" 

« © - I- 

M « « O 

« © 1- 

Z O II O 

out- N O 

I- r o 

o I- iji a: « 

(J O II 

iM - k. - 

-I « « •■ k. 

+ V I « " 

XXX \ \- 

II X 

Z k. Z -« UJ 

O >-i O k. z 



r> t v> ■ON » o. 

N N N N l\ N K 



O«NM1->n<PK«00.8«C4F>*ln'0l\<D0-8— Mntl 
«0«>CI«0<OIO<0«>(»0>0>0-0-0-0-0-0-0-0-8e ©©©' 



s 

m 
u 

m 

a. 



■a 

< 

£ 

B) 

CD 

u 



c 









8 


























n 














u 










it) 




















«:• 


























1- 














E 










o 


















o. 


■> 


























k. 














1- 










in 


















t: 




























kJ 
























O 


















Cl. 




























_l 


<* 












r 










J 


















'H 


CL 
kJ 


























ri 


X 












> 










K 


















1- 
l.l"l 


iCl 

r 


























UJ 


n 






















*■< 


















_• 


UJ 


























E 


1- 




<* 


















Ii (Cl 


■4- 
















Ij 


o 






















-1 






k. 




^ 




9 














a ri 


■4- 












u = 


- 




u 






















O 






kl 




•V 




r> 




V 
























CL U 


H 


o: 


Q 






















II 






_l 












tt 










*f o 


O 












Zi Ii 
































.". 






1—1 




^ 




X 










a 1- 


1- : 












1- Z: 


kJ 


o 


UJ 






















X 




z 


ITi 




1- 




u 




^-/ 










H o 


o — 












Z 1- 


z 


^ 


1- 






















■■_- 










k. 




I 




tt 










■*. c 


vj in 












U O 


o 


t~i 


> 






















;-: 




LL 


UJ 




u 




1- 




\- 










S " 


■■ z 












-. — ■ 




t 


OJ 


























O 


Q 




_i 








k. 












© a 












Cl Ii 




























Zi 






r. 








= 




u 










1 — 


II Z: 












(r t- 


'I 


a! 


Z 


























\- 


ITi 




ro 




» 




-1 










k.2 


/-. 1- 












W'l 




z 
























z 






X 






















U O 


Ci. = 












U : 


1- 


.-. 
























kl 






O 'I-. 




t_i 




II 




k. 










-1 Z 


■•_' .k 












_ a ij-i 


i' 


o 


^ 


























u 


t- -< 




© 




Vt 




I>-I 










i: 


Il X 












1- 1- z 






UJ 






X 
















P 




z 


o »-l 








1- 














rj IN 


►H _l 












u-i = a a 


~p 


kJ 


2 






11 




















'X 


■J k. 








-1 




*t 










1- ■<• 


■ ■ m^. 












'I C Q c 












r-: 








K 








© 




J 


•■ k. 




m 








X 






















If; 


o ct a 


1 


^ 


3 






1- 
















II 






= C 




k. 




k. 




■K 










."ZO 


— z 








U"; 


If; U-J 


kJ ' 


1 


1- 
















1- 








.'--. 




Q 


f-l UJ 




k. 




I>-I 




= 










C 1- 


t •- 








u:: u; LI in 


in 


G iD ')-| •- 




■I 


z 






E 








X 








X 




kJ 


a D 




V-. 




■" 




G 










G o 










u:i II J u) 





1- r ii 1- 


V'l 


u 


■I 






kJ 








u 












~ 


_i 1—! 




I.J 




Vt 




kJ 










O ij 


S K 






\1! 





1- 


_l u o u 


Cl 


Ii 






r 








z 








M 




il 


o in 




t4 




t- 










X 




D ►. .- 








Ul 


G 1- 


1- Q kl 


kl ■! Lj -J 


_1 o 


kJ 






1- 




















ifl 


ui --. 










t 


S 










»-i 


z 5 








1- 1- 1- 


U U) 


Z Z — ifi 


la 




o 














© 








— . 






= CL 




in 




■K 


ri 


t-i 






1- 




O /-. 1 


— . 






o 


c iJl 


" 


r^. 




2^ 


Ii 






r 








II 


/~. 










U 


UJ 








= 




1- 






X 




1- m X 


a 2^ 






1- 


ij: c 1-3 ■• 


■■ = c 


6 O kJ k. 1- 


1.1 


a 






1- 








/-■. 


Q 






G 




'D 


1- 


* 


a 


K 


I-I 


o 


i-i 






u 




^.-_l 








o 




: > 1- 


_! >-• X O 








o 




kl 








X 


If.' 






Z 






z ct 


N 




IN 


1- 1- 


in 






^ 




1- G II 


m B 






'-T 


" " =' E 


X a 


kj :> 1- 


■I 


Q 


a 


ff: 




o 
















■I 




r 


— O 








k. 


C: 


c 






■■ 




Z Ct X 


(r a 








z 1- 1- 1- 


1- •_•: 


2 ■! Z 


1- 


U 


kJ 


<y 




= 


X 






»••' 














Ii 




ct 


z 


u 


IJ 


CL 










5 o _i 


r 








2 in If: a 


Zi 1- ■■ 


D z a 


•I 


Z 








II 


II 








.^r 






-1 




1- 


Ci. u 


U 


o 


kj 


-1 






kJ 




X 






i- 






a 


c -I kl 


Z = i 


O Ii 


Q 




p4 








LJ 






— ; 


X 






o 




— : 


CL 


r 








z 


kl 


z 








2; 


1- r 






_i 


G U 2 Z 


in kj jc a 


;- vj 




■I 


a 


> 




© 1- 






•"■ 




V 


X 


II 




CL 


Z H 


1- 


I-I 


P 


n 


CL 


CL 


■I 




n 




Zi u u 


Z ij 


<Cl 








3 _i 


ai Q O 


'"■ 


-1 Q 


-I 




'. 








_l 


j^' 


II 


II 






E 


U 1-1 




k. 






' 


rz 


u 








ciTi r 


o ~ 


Kl 




o 


c 


Z kJ 


U Ii 


Z 


Cl 








X 


z 






o 


© 






X 




>-4 


r k. 




k. 






m 


\- 






.V 




> D 1- 


•1 _i 






o 


J 


^ -J I 


n If 1 Cl 




X 


k. 


=) 






kJ 






II 


o 


3> 


D- 






■ ■ 


K k. 


G 


O 


v4 


* 


V 




kJ 




V4 






_i = 


O 


Kl 








Z 1 


G 


U 


O 






*r 










^.■* 




^: 




© 


o 






r 




s 


U 


a. 




« 




O D •" 




1- U J 


1l 


"il 1I "il 1I 


"; "11 li I1 


2 id Ct 


■I 






kj © 




1- 




/-- 


X 


H 


;■.: 


^; 


IH 




II 




X 


Q 


'■-■. 


r 


+ 


z 


z> 




t; 




D O 1 


1- 


c 




<**>*»**<* 


VHh ft ¥t 


O kJ 


kJ 


kJ 


2^ 


Q 


II 


^ 






J 








1.H 


_1 




k. 


5- H 


■.^ 


I-I 


\^ 


■■ u <*ir 


t- 


CL 






> II 


l-Z 


IJ 


^ 


a 


a a a a 


a a a a 


Cl Zi- 


CL 


Ct 


o 




Cl 




= 












_1 






m 


= 1-1 


■I* 


Cl in *> 


= _i 1- 


13 


z 


* 


£ 




1- = ^. 


z -< 




kl 1- 


1- 1- 1- 1- 


1- 1- 1- 1- 


1-1 »-< 




3 


»-4 


Ini- 


k. o 




•■_' 


^ 


II 






k. 




■• 


/s. Ifl 


x ro 5 


X 


+ 1- _i 




kJ k. 






* H Ck 


11 a IN 


X 








* z a 


^ 


1- 


l/l 


1- 


■• 




CL 




;■-■ 


-I 


3- 


z 


^ 






© 


v:> 




a 




Vt" 


+ 


G 




D 


l-l 




* r 1- ■•-■ 


a a » 


1- 


T- 


z z z z 


Z Z Z "^ 


2 o 


2 


O 


a 


k. © 


■• 


G 




^ 






kJ u 


• ■ 




II 


^ct 


G 


Z I-I 


Q i: 1- *vu 


Q 


* 


■ ■ 




2 Z II 


a ^ 






kl kJ kl kl kl 


kl kl kl kJ 


wi-iO 


O 




u 


o 


II 


_i 






Z' 


_1 


_i r r 


_l 




= k. 




z 


kj 




+ I-I 


^ 


r- 


^ 


X 


-1 




o = *~* *^ 




OQ 


V4 


X I X X E 


E E E I 


n Z Q D Q ct 




•n 


e 


z 


11 








O 1- 


1- 


Z 




l-iQ 


K n 


•t Z kl 


■I 


^. z 


c 


<z 


= 


-I 


*~* 




1- ct 


z ki 


D 


^■ 


t- 


1- 1- 1- 1- 


1- 1- 1- 1- 


Ct 2 Z 




K 






1- 








^.. 






/^ 








Lt •■ 


*ta 




I- :> 




t 2 




in 


". 


K 






o 1- a k. 


kl X 


m 


/-•. 








_i o IT' a 


ri 


»-l 


© 


z 




o 


© 




_l 


o 


o 


3- 


— > 


O 




-I 1- 


ac _l 


:: 




; 


no© 




Sk. 


o 




IJ 3 •- 


X V- o 


Vr 


~ 


s = = r 


: s s s 


O D 






(0 




in 1- 


K 




z 


H 


y- 


v/ 


^~- 


1- 




O _l 


^O 1- 


= ct © 


^Q 




ifi 


V 


in 


1- 




•• a z •■ 


1- 


J 


a 


3 


Cl kl 2 Z 


m 1-1 _i I 


LJ 1^ l_l 


i_i 


■I 


1 




r> 




X 




^^ 






?.; 


^: 






1.1 II 


«> i-i 


:: 


1- o 


= 


<*i-j 


«: 


i^ 


*-i 


' 






■0 Z U N 


in 




1- 






= = = r 






1- 


in 


Q IN 




•\^ 




^.; 


© 


© 


»-i 




© 




= X 


1- = 


.A, 


= s 


/^. 


(£ : 






* 




© 




•Oi-<E(D1-©M© 




11 


"11 "11 "i! n 


II II II II 






H CL 


Z 




II 


«f 


X 


v4 


II 


II 


— 1 


_i 


X II 


X 


_l 


k- 


V 


11 


WT 


v< 




•r* 


« 


H 




- 1- 


■4- -v v 


II 


z 


Vr <tKtt >tt *» 


*►<**»» 


1- »- >- 1- 1- D (- 


H A 


X 


D 




_l 


X 


X 


/. 


v 


X 




1- ■• 


U 1- 


4i»«>l- 


*> O 1- 




1- 




1- X kJ il K Id 


X X 


^ 


kl 


a 


a a a a 


a a a a 


Z Z Z Z 


z 








Z' 




z 


1- 








X 


X 1- 


1- Z Ct 


-lUXX O X 


II D 


z 


z> 


Z 


D 




inDZk.30_l_IS_ll-l-l-l-l- 


1- 1- 1- 1- 


1.1 »-l *.! »-4 




Z 


^ 


z in 


ct 




X 


r 


CL 


ct 






X CL 


X 


>-' CE 


a. 




a 




«>a u 


CL 




Cl 


CL O 


m I-I in 


1- 


%.^ 










Ct a (i Ct 


ct 


kJ 


u 


u O O k. kJ 


1.1 


a 


Ok-k-kJOkJCt II 


k.Zk.k.Zk.ZZ 


a. z 


Cl 


z o _i o a k. o 


O k. k. 


5 


k. 


k. 


k- k. k. k. 


k. k. k. k. 


ccacLCLCLCtctctijk. 


*~* 


z 


G 


k. 


k. 


•-< 


l-l 


Z k. 


•^ 


a Ct *n-i -1 


•i 


1.1 M 


»-i 


O II 


o 


'-' 


IN O 




k. 


o 


13 a 1-1 o 


Ij 1-1 1-1 




»-^ 


1-1 




H II n n 


« 01 n t 


u:i 


•0 


r~. 


« 


0. 


© 


^ 


M rj 


■4- 


u:< 


<< 


N 


05 Cl. 


© 


— IM 


1" * 


in 


ij r.. 


<0 


o- <s 


^ 


0) 


ro 


* 


Ii:! 





r. 10 <y © 


« IN Kl 


■4- 


V) 


1:1 


r (o c>. © 


« IN K) 4- 
















*^ 




^ 












IM M C( 


M « M Ct <M M M ro ri ri 


n 


f> 


Kl 


r. 


r> Kl Kl ■<• 


■4- -4- -4- 


■4- 


t 


t 


■4- f f in 


11:1 Ifl Ifl Ifl 



42 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



GAMES FEATURE! 









-1 




VI 












Q 




o 


















































II 




rs 












Z 




Id 


















































-1 
















1- 




2 
Id 


















































z 




z 












10 




a. 


















































u 




u 












a 






















































r 




r 












u 




Q^ 


























VI 
























1- 




1- 












g 




^ 


























N 
























= 




VI 












3 




a 


















































* 




1 
















2 


























O 
























= 




/v 












1- 






























1- 
























II 


; 


V 












K 




r 


























O 
























y^ 


u 


.^ 












2 




1- 


























o 




















■N 






_l 


N 












C 


















































N 




K 
-^ 


5 














Q 




= 


























^. 


N 


















O 




N 


<n 


n 












n 






























> 


N 


















t- 




>-' 
















= 




1- 


























a 




















O 




«» 


<z 


11. 
















2 


























d 


2* 


















o 




(I 


y-\ 














1- 






























y y 
























X S 


•■ 












2 




Ct 




= 






















a: 


X 


















z 




■^ 


o s 


_l 












n 




Q. 




a 






















-1 


t- 


















n 




*> 
















a: 








t- 






















d 




















a. 




1- 


• » 














a. 




2 




u 
























= 


















-1 




L. 


in 1- 8 


O 1- 
















jd 




> 






















X 


X 


















o 




Id 


ut- c 


t- z 












2 




Z 
























VI 


o 
















= 








-1 


a x- 


n 












U 




1- 




1- 




















+ 




/v 


















= 






= -1 


8 U 












r 








(I 
















VI 




-1 r 


■w y^ 














_. y 








L. 


m ^o 


II Cl 












1- 




iN 




X 










<s 






VI 




H 




y-n 














1- a 




1- 




»-i 


I 1- 1- 


N 
















U- 




1- 










2 






N 




-lO 
















■1 u 




z 






IdZ o 


2 












G 






























c 


k -1 














X 








z 


flt 1- o 


U Id 












II 




1- 




o 
















o 




2 t- 


'\_l 














y 




cc 




u 


(_ .K .. 


G r 












* 








a 










z 






K 




u 




X k 














r- 1- 




a 




r 
1- 


= = : 
■-■I. 


ij- 1- 












11. 




^ 




1- 










Id 

X 






O 




X 

t- 


u 

z> 


•wx 














d " 

X ■ 




1- 






-1 


= ■>. 












a 




a 




». 


* 








1- 












k 


'I- 




N 










u 




x 




Ct' 


". v'l U 


u rj 












z 




z 




z 
















2 




VI 


~- 


►H « 






<M 








1- u 




u 




1- 


= U Z 


Z '\ 












<r 




o: 




ii 


- 








G 






c~- 




1 


o 


^d 




N 










O l»'i 




z 




II 


Q 1- O 


M ^ 




















o 


•, 








/v 






1- 




II 


> 


•I*" 






M 








z 




■" 




^ 


\ti<La. 


r © 












a 




Q 


IS N 




r> 








V 






d 








t- -w 




o 










1- 




^ 




N 


iL a 


1- -^ 












1- 




1- 


Ck .^ 


^ 


Ck 








Z 










N 




X <n 




t- 


O 








c ■ 




X 




^_' 


O -1 


O kT 












y^. 




/x. 


VI vl 


o 
















2 






t- O Q 




o 


1- 








Q 2 




^' 




I 


1- 1- -1 


z o 




■<! 








w 




V 




> 


'. 








ll. 






s 




d 


z 


n n 




J 


O 












N 




h^ 


m d u 


= a -5 




t-: 








.^ 




^ 


dj la 


s 


Ml 








n 












n 


CC Z N 




■■ 


u 








~- Q 




HI 






r 3 


11 + = N 




VI 








s 




G 


^ -1 




0. 








■■ 






1- N 




a 


11 V 




vl 










o 




II 




L. 


ut- = 


<tr ^. = VI 






* 






■^' 




>-y 


in in 


1- 


Vll 








© 






Z 


® 


b. 


a 


b. *rN OO 


11 


8 N 








> 11 










:> 


j: ^ II 




o 


r. 




N 






5 


o o 


Z 


'. 








N 




OO 




IN 


n 




" 11. 


8 :£ 


V II 








= z 




X 




■■ 


^ © 1- 


■■ a % o 




1- 






<ri 


z 






u> u 




vl 








« 






a. 




•■ 


z 


"t- Z 


N 




NX 












■^ 


■0 


-1 


D SZ 


= 1- i: 1- 




o 






r^ 










a 


Ck in ID ID ID ID a 




N 


a. 


^ 


_J 


y 


_! ■• y 




r 










t- t- 




(T N 


*-« 


O - " 


.. ,.- .. o 




o 


z 






a 




Q 


z z 


Cl 




Ck Ck 0. !>. !>. 


1 








Uj 


n 


r 


inx zy 


O Z 


t- 






z z 




t-i 


^ 




> a. 


U Z ". o 






u 




z 


z 




Z 


u^ 


IS 


•• 




VI VI 


VI VI 


3 




z 


z 






t- 


1 t-y 


r 


t-y 


z 






M H 


t3- 






O 


= O Cl 


r- Id ' ■■ 






r 




Id 


o: 


h.. 


II 


(0 z 


© 








II 




u 


u t- 


o 




o ^. ^ 


X 1- 


O X 








a Ct 


<U 


-1 


o 


1- 


1- 


a: _i = *f 




1 = 


1- 




r 


= 


(0 




1- 1- 


V u 


o 


o o o o o r 




X 


X 




1- 


X 


1- ^ V, 


1- 




OK 


a 






a a 


3 




1- 




1- z 


r ■ i; 


\i.' t-.. 


II r-i 






1- © D 


v4 


13 




X 




1- 


1- 1- 


t- 1- 


■■ 




t- t-o 




z 


X -^ 




vl 




loS 








R 




o 


v« 


Z G U 


ii. = 


in ifi 


y. £l 


G 






(- z 




1- 


O D Z 1- 




o o o o o 


y^ 








1- 


8 


11 


© -w *K5 


1 


na 


n " 






z z 




O 

1- 


o 


II 

N 


•-• r 

££ L. t- 


Z' " ••• 1- 

o ■■ **z 


^ VI 


■:•• _i 


/\ 




G 

H 


/MI 
V Z 


u 


^\ 


1- 1- U 


o 

1- 


IJ 


O iJ IJ o © 




?? 


/\ 


II 


^\ 


Ii «» 1- 

X d z 


t- 


.'\ 


II y. 
X V 


X = 


z 




uu 


1 






'•v' 




V 


tl II "^ *' 










K^ 




II 


11 


^^ 


N — 1 


II 


V 


"■ X Of 






•o 




11. O « > -1 d HI 


o o 


a i-i 








■^ z 


I 






1- ll. 


o 


y^ 




y^ y^ 


X 




^ 


y 


. ^ 






►H /\ 






■■ ^. 


VI o 


3 




K 1- 


G 


■0 


a 


■• = t- ^ 


= N 1- a 


1- 1- 




G 




G 


G O 


1- S Z © Q 




V. L3 


X 


X X 


X X 


3 




G 


V 


© flt L. a ^ V 


ex 


a. X 


1 = 


K 






'ci 


II 




o 


N 1- « 


a 


o o 


•■ 


> ••-■• 


X 


' >^ 


■ >.-• o 




■-■■a 


^.^ ••u' 


© 1- 


z + 




••^ >-y 


^_' -^ 




z 


>-y 






O 


n 


o z «» 


>-y 


>-y 


11 ^ 


11 


y 


X 


V. N 




K 


Id 


L. 


1- II 


1- Hi 1- ■• 


ij o 


1- 1- 


Z> 




' Zy 


2- 


IN 


=• D 


z> z> 


II o IX a a 


M 


MK 


:\: :•■: 


1- 


LL 


Zy 


5^ 


^ 


b. 


■■ 


b. y a 


Z- 


il 


^d 


y- 1- 


a. 




II H 


^ 




z> 




1- Z _l o 


Z D Z 1- 




-1 z 


1- z 


1- 


■ Z 


z ct 


11. 


Z 1- 


Z Z L. Z 


D H »H 




N M 


* in z D z z 


z 




1- 


■• _i t- 


Z 




x« 


X z 




t- X X 


09 


a v-i e 


X 1- 1- 


►H iCl i-i X 


G G 


II HI 


X 


X 




D 




y 






1- II 


o o o o o 


n 


1- 








S 


X 


8 11 








■^ 11 


8 


X 




c 


o 


o 


II 


ija:ii.oaoau 


II II 


X ct 


U 11. 


UJ 


i u. 


li.p 


k. 


It. a 


L- L. 


ii. ii. 


u a z 


11 


II II 


II II 


II 


u 


It. 


It. 


b. 


II 


bJ 


11 -1 b. 


b. 


b. 


d b. d QC 




y b. b. 


•- 


L. 


o 


_i«zai-jajaz 


d CL _l Cl 


Z 11 


z 


: n 


n > 


n 


11 - 




M 11 


CC 11 o 


3 3 3 3 3 a a 




i-i 


i-i 


-1 


2 i: _l " 


1-1 






1- 11. 


b. 


z 


n n 


(0 

-1 


_ 


c-t r> 


1- 115 •0 r 


IK- •>. O -. 


>M ro 


-t U'l 


v f .. 


« 


1 O- 


G 


V, 


N 


t^-ir Vl -v 


K 10 & 


G 


V M n * m 


tl 


N 


OO o> © 


V, 


M m -f m 


•0 


IS OO IX 8 


^ 


N 10 ■<• 


•o 


■o 


■f. 


.,1 ■<) •<! -.J 


1 ri fj K r 


h., rv 


r- r. 


r\ r- 


r 


, r\ 


10 


DC 


OO 


«■ !>:■ 


<o OO 


0"J 10 oc 


0- 




O. i> 


O- 


!>. 


i> 


O.0>G©©©G©© 


8 8© V. 


^^ 




VI V 




^^ 




^ 


T-l VI V4 V4 


1 VI ^ VI VI 


VI VI 








1 VI 


V 


*^ 


1 V 




V^ VI 


VI v4 vl 




« « 


VI v4 










*^ 


M N M N N « N 


N N N N 


u 


M IN M 


















K 




















o 

t- 
o 


















■0 














2 
= 
11 

k 


















N 




















a 


















IS 














«» 






































































X 


















K 












0> 




IS 




-1 


















































■0 












in 




<0 




a 


















o 














«» 


















N 












VI 


■0 






H 












IS 






t- 














1- 


















VI 












K 


r> 






2e 












IS 






o 














k. 


















*. 












o © 




o 
















VI 






o 














y 


















ID 












w in 




t- 




= 
































_i 


















M 














o 


o 




■ 












o 






IM 
































VI 












*. K 


t- 


o 




2C 












t- 






II 














b. 


















K 












•c * 


c 






O 


rs 










o 






































f 












10 v 


o 






Id 


» 










\3 






J 
































N 












- N 




■ 




2 
































«» 


















V 












- ID 


1 


§ 






o 










I., 






d 














X 
■k 


















O 












WN 


y^ 


1- 




3 


t- 










> 






■• 














r 


















t- 














V 


















a 






y^ 














y 


















o 












K K 




2 




> 


o 










a. 






-1 














z 


















o 












f t 


0> 


o 
















bj 






■^ 










N 




jr 














v4 
















V) rs 


■^ 


= 11 




Id 


= 






V4 




a 






d 










■c 


■0 


5 














N 


r> 


> 














(I 


— 1- 












+ 




_i 






n 












IS 








N 










M 






«) 








K K 


•1 


X o 




Q 


— 






-1 




a 






II 














cc 


















z 




■N 








!•) r> 




a: u 




a. 


^ 






11 




















O 




y 










VI 




O 




o 




VI 






■OWN 


a 


xa 




il 


c 






-1 




r 






Q. 










1- O X 






I 




M 




1- 


o 












N 


VI VI 


2 


Q •-• 
































I-- 


1- 


1- 






U 








O 


1- 


y--^ 




O 






VI 


K ». 


<r 


Q 




a 


1- 






Z 




^ 






d 








■o a o o 










^ 




J 


o 


■O 




H 








N N 




Id 






o 






u 










n 








IS 




kS 








t- 




O N 






o 


X 




C 






C ID N 


a: 


X <r 




I 


Id 






X 










■■ 










© 




^ 










t- 




G 


■ ■ 


N 










t- 


*4 VI 


.^ 


1- 






CL 






t- 




o 






y^ 










H 


a. 








,-1 




O 




/v 


s > 


> 




« 






O 


'. S 


v 


y 




2 


n 










c 






a. 








o 


b. 


II 








1 




o o 




V 


II 


y^ 




G 


S 




c 


-1 «J 


^ 


z z 




3 


Q 






V 




t- 






>-y 








t- 


Q 


y. 


, 






« 




K 






« 1- 


VI 




in 


ID 






10 < 


o- 






O 








I 










d 






■O 


c 




_l 


a. 






^*. 




a O 




l! 


li. X 


1 


(O 




OO vi 




y\ 






Id 




Q 


t- 


z 




II 




bJ 


■0 










IS 


o 


-1 


■^ 


y 






N 




^. o 




II 


u u 


> 


M « C'J « 




o 


K ^ 


a 


(OD 






d 


n 




y^ 




z> 


K 


■0 


"if-o 










CL 


d 


:> 






\^ 




■w 




VI 


« z 


■^ 


V 


^ 


VI y^ 




(z o> n <o » 


=• I 




-1 


r 


a 




M 




». 


VI 


IS 


N K 








y\ 


H 


n 


o 






a 




/-% VI 




11. k. 






© 


G 






■* <) N 


o o 




_l 


1- 


_l 




■^ 




r> 






-- V 






o 


CL 


o: 














-1 1 






■• z 


t- o u) o in 




«» 




V Q 


a = 




Id 




o 




II 




o o 




OO 






H 


*- 


■■ 


05 


~T 










-1 II 


VI 


y. 


y-. Id 


2 1- 


VI 


1- vl 




a 


*L S 


z 


u 




ll. 


z 






n 




> 


t- O -0 OO o 








N 


= 


OC: 


c 






L. 


V4 


■^ v^ .^ 


■^ N 


in lo r 


n 


O 


XO V. 




r o isi o <z 


ij 1- 






n 


= 


IS 






s 


o 


1- 


rs vK 






3 


+ 


■ 




z 






•-• 


iM a « M _i 


VI N V, 


■ 


. 1- 


11 


■J 


y^ 


•i y 






3i2 


2 Z 




3 






«ll. 






IJ 


c 


V o 








in 


■ 














►1 N v» _l 


M v» 


+ 


+ 


X 




-A 


•• X 




t- 




O li. 


T I 






o 


t- 




n 




K 




13 


il o 






b. 






il 


m 






_j 


■M 


^ -^ 


v» O 


_i 


-1 N 




^*. 


v^ 


y^ ^' 


n 


2 


». ». 


12 a 


Q a. 




> 


O 2 




n 






VI 




o z- •■ 






in 


>-y 


Q 


—. 


n 






h^ 


•« o Q c a 


O 1- 


■« _i 


-1 11. 


* 


G 


>:©:■; 


M 




■»• © 


~ II 


= a 




= 




n 


O _l 




n 


1 


cc t- ^ © 








1- a in 










t- 


Z O t- •-. 


O - 1- O 


N *- 


♦- 




in -0 


ID K 


VI 


■0 a 


^■0 


y^-l 






N 


t- a 


t- 


H 




a 


If 


HOG 11 






a 


z 


you 






O O O il 1- c 


t- iN O O 


■« M M li. 


0. o 


VI 


o 


V. O 




N a 




G 


1- z 


y. 


■* 1- 


V 


a. o 






a 


y. 


y. 


o o — . 






o 


n 


a 


IJ 


z 






1- 


1- o 


o o a 


O vi in •■ 






N t- 




v^ 


X^ 


z 






ID Z 


Z Id 




V. Z 


z 




o 


O 






a. 


a. 


.. .. Q_ 


■0 












d 









o ■■ 


V. o .. o O ■■ V 


O t- 


1- ■• 




.'^. 


t- 


^K Id 


z 


o o 


1 Id 


"X 


1 




ct 


1" 




1- 




z 






11. 11. '^ 


rs 


-O 


a 


t- y a. u 


ta 




e 


■J- 


1 ■• o 


■■ O Ot 1 


1- Z 


z -< 


■v4 


X 


z 


X Z X 


Z Id 1- 1- O X 


ai- 


/v 


z oc 


O Id -c 






Id d d 


H n d 




K 


t- 


o 


a. 


n 




3 




II 

N 


■• 1 


/s flc ^^ a 

■v- II V II 


© 1- A. ^. 
II O ■-.,' ^/ 


O •- 


•I 11. 


o n 
1- > 


X.' 


M 


^_' n 


1- Lj r o g a t- 


a 


V 


Id a 

X 




r 


•0 


M 




r 
1- 


i-i 


•-• 


a _i " 


o 




+ 


z 


k 

3 


-1 


m 




■^ 11 






1 


K 1 




a. I— w u 








rj 1— 




















.R 






1 ^. 


y^. y. y^. y^ 


.-. ij y. y. 


■■ O O O O 


•o 


-^^ 


IS .-. 




1- 




«r-l 


Z V 


^ 


t- z 


o 




III N 






cooooooomi-oooin 


OO Q O « X 


2 




o: 


II _l 


_l -1 -1 -1 


_l ■• _l _l 


_1 Z 


z z o a 


O 


X O X © 


M 


-1 (■! iTl 


IS Id /^ 


z 


Id 


> 


_i 


3 






x«ooa«>ooooot-oa . 


OO Z XOK D 


c; 




o 


-> _l 


_l -1 -1 -J 


vl vl _l _l 


_i a 


II <r 


■• o 




■^ 


*_' "^^ 


v« 


©IDin-i3Zli.l«JXv 


». 


vl r 






iji a 




z 


v« 


V 


V« V« VI 


ij 


O 


V *.' 


V. iz 


s 


v« 


; ^ 


o 




b. 


L. -^ 




>-- _1 \.-^ 


^. 




X L. 


1- 


;■*■ 


t- K 


y\ 


II v 


1 1 


n 


vl t- \^ 


IX 


11 t- 




t- 


o 


O N 


II 










J 


1- 








y 


u 




•■ 


.. <ra(r(r<ra iiair 


Vli. 


11. N 




2 -0 2 r. 


o o o o o t- ■■ 


3- 


^-' 


^\ 


t- 


o 


ij 


k. 




A. 


il 


il 


il ti il 


V 




a z 


H b. 


1- 


lO 


1- 






e 


1- 1- 


11 11 11 11 


11 a 11 » 


CC 'JUn li. 1- G 




O 


•-•o(ra(ra<rzii.o_i2 


^ 


■£. -I 


M Z 


2 






1- 


-I 


Zt 


Z>Z> ZlZ) 


1 


© 


J " 


D m 


Z 


Z) 


Zl z 


^ 




II 


X n 


II II II II 


II 


II 11 


II n 


X II 


n 


II 


II II 








« Q t_ 


OL 




■<• I 




ic 


© 


X 




•l\ ti 


*i in in 


II 


II 


in II 


m 11 




•fl 


a u 


09 




VI 


U " 








vMUIl.OOOOIi.li.li. 


Z Z 


a n 


1i.li. 


II 


ll. b. 


« a 


ll. 


11 


11 


U k. 


o 


o 


o o O b. 


b. 


O b. 


O b. 


o: 


o 


Z X 


a 




b. 


Zli.li.li.li.li. 


11. 11. L. r 


l! l! 


11. 11. 


Z " 


a: a a a 


n 


n n 


o o a. -1 o •- •- 


5C 




a 


n 


Ct _l 


Z 


n 


U U k3 U t3 


Q o o in 


o in Cl o 


►H 1- 


(0 




r^ 


DO ■> 


Q v M l"J ■<• B ij ^ 


<o o- 


G « 


w ri 


■<• in ■« r. 


» 0> © 


V iM ro ■♦• 


in -o IS 


O l> G 


^ 


N ro 


■<• 


in 


fl 


N 


(O "> G VI 


M Fj 


* in 


■0 IS 


ID 


o 


G 


"Z 




G 


o o 




^ ^ ^ ^ 




■>! f 1 0-1 fl C4 


W M M « M PI 


ri 1" 


Ki ro n ro r. 


rj r> t 




■<• 


■♦■ 


* 


* 


* 


t 


■* 


* in in 


m in in ir> 


in iTi 

VI V 


ID 


in 


1) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



43 



GAMES FEATURE! 









■<:. 






— , 














I.N 


CI 


















© 


in 
















s 














© 


bl 
















© 


*. 


■0 








o 


i)j 






t 














t 


05 








© 


© © 






•. 


© 


8 r\ 

















Wi 














0. 


© 






© 


10 10 in 






© N 


■. ■. 











© 






n 














'-. 






© 


CI 


-c 


-c © T 






in CO 


in 0. 








l> 


o 


© 




i>. 














tEl © 


I 




■. 


■•5 


in in 10 in 






* 


■. 


CO T 








^ 


© o rj 


s Q 




I, 














.. K 


© 




CI 


|> © 


ll 


- CJ -- 






■. 


© 


0. CO 








G 


© O IS 


© '■ 




© 














CI © 


•. 




c-l 


s Ul © 




•- IN 






s © 


r. 8 








K 


-<( O '0 © © 


© © 




OJ 














U1 CI 


© 




M 


© M © 


iN 


CJ ■- M 








11 


■. 11 










o. o 0- © •<:, 


iM © 




*. 














f 10 


© 




CI 


p.. CI 05 


10 10 10 Il5 






e 


n 


© 8 ^ 








CCi 


^ 0^ '■ "0 ■*'! 


■^ ll J 




© 










© 




M • 


© 






CO '. -- 


p; 


n 10 PI 








■. 


^ ^ 8 






15 




© © ' Q i>. • 


■■ t 




iB 














'. © 




© 


© © 111 ^ 


CO CO 0.1 G 05 8 






8 i3 © 


8 in 








O 


l\ © O Tv •. Q 


© '. 


© 


*. 




© 






© 




© <5 


.. 


^ 


■ 


--< m Ki 


■. 


■. © ■.■•■. 






^ * 


CJ 


■. CO 8 


© 




ri 


^ 


■-< o r-.. ■-< © © 


' © 




© 




G 


Q 




© 




.. o> 


© 


© 


© © 


■-IJ5 ^ 


© 


© -- PI © PI 






r> i5 


CI 


8 0. 


^© 




^ G do Ck ^ ID r-.. |Vj 


© ^ 


© 


© 




-0 


© 




c>. 




© •- 


c 


[fj 


■. ■. 


© © pi 




■- ■. © ■. ll 






© ■- 




N ^ 8 


© ^ 




(^ 


> 


'. ^ l)j .. — K 


-. © 


© 


ri 




i> 


fr 


© 


i> 




'- rj 


© 


-0 


■0 © 


..-05 


© © © PI S 05 






N UJ 


■. 


-rt ■. © •<: 


s © 






o 


© © '. © CO ^■ 


Q '. 


»H 








|> 








o -0 




-t 


-C CO 






■ <D CJ ^ 0. 






-- i3 




^ © m CJ 


15 in 




•: 


05 


>. r\ © '■ '. in 


'■ © 111 


© t 




© 




ro 


© 




c-l i>- 


. 




c-l -- 


© © © 


© 


© PI ■■ © ■ 






^ M 


-c 


t '. -^ '. 


PI K 




o 


r\ 


© -H ^ © © C'-l 


Q -. 




■■ o:. 




K 


<< 


t 




© 


-0 •. 


© 


G 




r. CO ^ 


-45 


<:■ • 8 CO 8 © 




© © © ■. 


© 


ri © o © 


^ 0. 








' oil ® ■. '. .. 


^ © 


© 


© ri 






© © 


C-) 


© 


^ 


■■ f 


--T: 


K 


't. © 


• PI G 


■. 


■-8 ■- Ci. ». 


■. 




^ ^ ^ •<• 




11 ■. ■. 13 


© ^ 




Q 


M 


© ••. '. © © M 






© '. 




CCi 


•■to 




^ 


ll 


t tSl 


© 


© 


© -c 


© ^ s 


-C 


-CM© ^ © 


© 




8 8 8 N 


.. 


■. © O — 


•8 




^ 


•>4 


■■. © © s *. 


■i"i fi'i 


© 


^ fi 






© P.. 


». 


© 


ll 


PI K 




» 


■. ■. 


l» © © 


c-i 


s rj - •<• ■- 


inG888inin >. ci 


ll 


^ ^ .^ .^ 


© ■- 




<Sl 


« 


© K "^ © © "0 


r-;. 




Ki Q 




© 


G ^ 


© 




c-l 


<| '. 




© 


© PI 


-.1 CI ■- 


p. 


15 ^ 8 CI 8 


^ ■. ^ 


^ 


^ p.. ■0 8 ^ 


11 


■o -^ -0 ■. 


^© 








^ © © 'O '■ »■ 


». K 


© 


' p:i 






Ci. © 




© 




MM 


C-l 




'. 05 


■. rj © 


■. 


^© CJ r^ ^ 


O. PI •<• 




P) 0. 8 •- --< 


P3 


-1 ^ © -c 


© ■- 




isi 


.. 


1- -• M CI © -C 


t t 


'. 


© ■■ 




Q 


'. K 


© 




. 


CI -»■ 


•1"; 


•1 


© -- 


- ^ © 


r, 


r. © m ' © 


^ ■0 ■0 


r. 


lj ^ « M y) 


t- 


■■ 1- - o: 


■. © 






t 


^ Q — .. s r, 


w r-. 


© 


■■ If! 






© © 




© 


© 


-<; c-l 


© 


Tl- 


■. ■. 


CJ © 115 


-<1 


11 -C '. pi ^ 


8 ^ p^ 


ID 


P. 8 ^ in Ki 


■. 


c>. in ■. p.. 


© ^ 






M ^g K .. ^- r, ^ 






© in 




Q 


». >-. 


© 






1- -1 






M Q 


« G s 


■. 


■■ ^ 10 05 o 


■.■.■. 




.. ^ © © •<• 


© 


i;, .,<©.. 


^ © 




i» 


» 


in © f to '. '. 


s .. 


t-' 








© © 




111 


© 


^ ». 


V 


b 


pi -1 


..1- n 


-c 


T « -11 i> ^ 


8G8808 ■.— ■- 


© 


pi ■. ■. ifi 


© ■. 




^< 


^ 


■fj ■</ © <•■! iM -i- 


t t 


© 


Q >. 




© 


-. *. 


G 




.. 


© © 


01 


C-l 


- iC 


CI •. © 


p. 


K 05 CJ ^ G 


■. K ■. 


■. 


■. ■. © ■. © 13 


t -1 © (-J 


■■ © 






^^ 


-. ■. -,< .. •<; 


■0 


CI 


■- -c 




■<^ 


© © 




N 


© 


n If; 


if- 


05 




o:i « ii5 


T.I 


ihp;i ■.ll©©©© 


© 


Q © ■ N © 


.. 


^ --:. ■. in 


© ^ 




Q 


■<) 


03 t •■ n \i> ii:i 


111 u-.. 


K 


© ■0 




Ifi 


S ^ 


—1 






CI « 


CJ 


■0 


P-J ^: 


•<-| if: ■. 


M PI '.■^ISV: 


■...■. 


■. 


^ ^ © CO ■O U5 


©«©-<■ 


© IN 




K 




<• iN f-i r.. ■■ © 


© © 


r-.. 


'. u:i 






© G 


Oj 


.. 


©■ 








•* S 


■• p:i I.V 


■. 


^ T iM -- pi © © © 


8 8 8 -8 ^ 


VH 


■. ■. ■. ■. 


Ul -'5 






^ 


■^ K K « »■ « 




r-.. 


■<- © 




iM 


'. C 


M 


© 




'. c-l 


k. 


05 


■■U5 


CO ■PI 


© 


© CO 10 PI ■. 


-. ■. ■. 


■. 


.. ^ © « HI CO 


P5 Ci. © © 


1- 0. 






e 


»■ © *^ '• r--. '■ 


V '. 




d; -^ 




1- 


T CI 


». 


.. 


V 


© 111 


© 


11 


» pi 


«•<•■<• 


10 in ^ ■ ■- ©©©©888 ^ ^-^ 


G 


8 15 ^ © 


'. -t 




IS 


Gi 


© N '.'«■■-< iM 


•■M ':l 


*, 


CI ■■ 




o:i 


G .. 


O 


Ill 


in 


ITi CC: 


© 


t.O 


O © 


CO 05 c-l 


0- 


Ci. c -- Q in 


-.'.>. 


- 


^ '. Q « 05 




CJ p:. © ■0 


S V 




-. 




©«©•<:• ■ 


'0 'O 


© 


'• 1- 






•1) G 


© 






CI o 


C-J 


11 


05 --< 


11 .. .. 


r. 


r\ p. 1)0 .. •<• CI © © © o 8 •. -o © 


K 


.,< T ^ '. 


© G 




« 


!>' 


V >■ © IT: © '^ 


T-: -^ 


© 


.:•- If: 




ri 


'. 10 


CI 


s 


PI 


c-l ■^ 


•0 


^ 


11 ■. 


-co © 


■• 


^ -„ -rt r, 10 


•i3 .. ^ 


.. 


■- S r. p-J -rf 


© 


^ ^ CJ U5 


10 ^ 








i;>. © ■-; © © <ij 


')-.' Vi 




r.. Ti 




i> 


© © 




p. 


C( 


.. ^ 




© 


■.C-l 


© c; ui 


U5 


U5 ri ri U5 -- 


-C Ci. CI 


© 


CI c>. ©■<-■. 


.. 


8 © 0. -- 


r--. CJ 




C- 


O 


'. © Ck -,< O '. 


*. '. 


ly 


*^ !> 




1-1 


111 -H 


K 


K 


CI 


c-l © 


k. 


in 


© P.. 


-. •<• 1- 


8 


© ■. ■. © ■. 


PI ■<) r. 


CCi 


0. ri CJ .. © 8 


^ ^ P5 e 


^ G 




<' 


r-. 


© ■■ ■• 0- e 


© s 


', 






■. 


© .. 


© 


© 




S- G 


p. 


1-1 


■•« 


-3 CJ ro 


•<• 


1- O S C CI 


^T •* 


f 


1- - •<• Q 1- 


CO 


©©•<•© 


t> n 




'. 




r-.. c- © -c *■ 05 


© c-l 


© 


© © 




© 


" Q 


». 






ri -ij 


© 


<y 


•^ -^ 


-i- ■. ■. 


1- 


1- ^ ^ -- in © pi M PI PI © • •• M 


© 


■. © K ll 


t t-l 




s 


CO 


« .. r, ii:. © 0-1 


W 01 


r. 


• o:. 






K K 


© 


© 


© 


oil *- 


■> 


* 


PI ^ 


CJ © 1- 


■. 


■ ri © -PI 


■. ■. K 


■. 


■...©© ■. 




© in © ^ 






•■. 




OJ © « T K ' 


K s 




© r. 




© 


© © 


bl 


k. 


'. 


■- Q 


P-. 


m 


CJ © 


« .. CJ 


8 


© © U'/ © 05 © © © © © 'I- -. bl © 


.. 


: -^ ■. © 


to © 




© 


IS 


-. r-. oj 03 -1 © 


© © 


0[i 


© • 




© 


'- © r. 


© 


pi 


Q •<;■ 




11 


11 ■. 


■ © n 


.. 


■ rj pi •. K 


in -. •. 


K 


*. © r-. CI 8 


■0 ■- © ■• 


■. ■. 




■:^ 




© w .... oil o 


•<j ■<: 




w © 




C-4 


G i> 


Pj 


T 


c-l 


'■ T 


© 


"j 


■ S © S P) 


8 8 CI -- 8 8 


«i •<• •<• 


T 


-- iTi 8 r, p^ 


•c 


•<• © 10 © 


© 8 




et 


isi 


*. iJC' © O '. ■<j 


•<j v 


© 


K i» 






© ■■ 




© 


r; 


© ■ 




© © CO 


.. 1.; K 


•c 


11 •. ■. .. .. 


r. 13 15 


•1 


p.. © 0. ■ ■• 


G 


© '. CJ '. 


■. .. 




V 


•-. 


© ^ '. -. © '. 






^ i>:i 




k. 


CI © 


©' 




pi 


^ Q 


s 


11 


■. 11 


© PI © 


•c 


11 © © 8 8 


« r. N 


p., 03 -- 0. © -< 




1 © M © 


© © 




VI 


iM 


^ © © © ' © 

© ' '. >. © Oj 


© © '^' 


© ■ 

-. © 




Q 










G 1- 
-0 1- 






© ■ 






. . . IM k 










■. ■. ■. -i- 
1- © © 05 






© (1 


■^ 




^© 


© 


1- 


© 


© 


© 


'. © 


© © © 


© © © © io © © © © © © © © © '<i 


P5 


© © 




CI 


■<;i 


•..©©© K f-4 


fl N © 


© © 




© 


© ■ 


s 


10 






V 




G T 


■.■.■. 


•0 


XI *.•.■. ■. 


K K ■. 


■. 


■. ■- ■ . ■. 


T 


CJ ■. .. ■ 


*- 1- 






» 


© ' .. .. © s 


^ ". 


k. 


■in 






• ® 


© 


© 


© © CJ 


© 


o 


■. ■. 


CI © s 


■. 


■<©QN8©©© 


S 


© © Q © in 


© 


CO ri G © 


© G 




1-1 


C-l 


© © © © '. •<• 


■* T 


© 


© ' 




G 


s ■. 






^ 


•■ri T 


CO 


* 


-< n 


M • ^ 


ll 


-- '. ■. 13 C-l 


». -. ■. 


* 


•. •. . ■ 11 




'. P) ^ CJ 


CJ « 




CG 


f-i 


© ., •♦ 1- © o 


f 1 © 


s 


' 1- 






'. © 


©■ 


^ 


© 


■o t 


CCi 


© 


•<• CJ 


-- 8 © 


■0 


13©©N0.8888S©©© CJ 


.. 


-1 -1 8 05 


05 ■ 




U-J 


r-. 


^ © <-i « -.ri p.:i 


(■1 C-l 


Oj 


© (0 




© 


© >. 




CI 




.. V 


V 


* 


VI ll 


■. K ■. 


*. 


■. •<, ■. ■. ■. 


■.».■. 


■. 


■. ■ .. .. .. 


C-l 


-0 ■. ■. .. 


^ CJ 




^ 


•■ 


CI ■<:• ■. • M -. 




'. 


'. ^ 






' 1- 


N 


15 


Q 


C-l •<• 


1- 


© 


■. ■. 


M O - 


•<• 


•<• ^-O •^■* 


© 8 © © 


© © © CI ^■ 


CO 


PI -1 G CI 


CJ 15 


-a 


N 


1- 


•0 ■.•♦•♦ ■- (•■! 


fi fi 


CI 


f CI 




(-1 


© CM 









•1 CO 


1- 




n M CO -co 


© CO M CI C4 © 


■. K ■. 


■. 


.. .. •. -11 M 


© 


t 15 ■- (-1 


11 -1 


« 


•<• 


N e 1- o f 1 1 <:i 


V, o 


<l 


Q © 




C4 


■r-: 


CI 


IH 


© 


■o f 


10 


©•<-i-'<iONN<M'Oir:iin-o©©os®osci cj 




•. -rt 8 05 


CJ -1 


3 


CJ 


(1 


- T -1 - DCi Vi 


■<, ij 


1- 


'i "^ 




C-l 


© '- 


K 


^ 




*, K 


». 


.. 


V *. 


■. i. .. 


.. 


■. *. ■. ■. .. 


■. ■. V 


* 


i. ■. ■. . 1. 


■. 


T •- ■■ ■- 


■. '. 


■5 


^ 


^ 






». 








• © 


© 


pi 


■o 


■* © 


■o 


<>- 


CO 05 CO O N 


J-t 1- «« - 


0. CCi« 


13 


•<•©©© — 


n 


-<3 O © PI 


U5 ri 




G 




« © « N r. f 


■i- -^ 


-1.1 


O- 10 




10 


« in 


© 






c-l PI 


t 


•<• 


G © 


-- © P) 


r. 


i\ r. CO CO 0. 0. 15 K 


r. 


"15 in Ll If' i5 15 


10 15 © O 


VM 13 




O 


•0 


vi N N r N r>. 


■* t-: r . 


r\ 


Cv CO 




CO 


© © 


CI 


CI 


CI 


M C-l 


CI 


M 


CO 05 


CO CO ■<• 


ll 




•<••<••<• 


1- 


•<••<•© ri ro 


PI 


© rj ri pi 


U3 O 








Ij T^ ^ 


^-1 








N -- 


iH 




11 






© --< 


ll ll 


- - N 


nn PI PI T) n 


VI r> ri 


rir) ri 1 1 ^■ 


T 


V -^ -r -r t 


t t 


u 








ITi 






















© 


















If! 






a 


a 


a a a a a a 


© a a 


(L 


a a 


f 


a 


a a 


a cr 


CI 


a a 


a 


« <r 


a a 


a a a 


aaaaacraciii 


CI 


a <r a a II 


a CO (r cr cr IT 


CL IT 


T" 


(- 


i- 


I- I- I- I- I- i- 


« K K 


K 


K K 


■<' 


i- 


K K 


K 


K 


K 


K K 


K r. K 


K K 


K K K 


K 


I- K I- I- l- 


K K K 


i- 


K 1- 1- 1- 1-1- 


© 1- 1- 1- 1- 


1- 1- 


O) 

c 


a 


<L 


a a a a a a 


- a ll 


•laainaaiiaaaaaoa 


-.4 a d a a a d 


(laaaaaaaaaaaixcr oca 


»< <r a a a 


<i a 


o 


a 





MOO 


Q 


Q Q 


© 


o 


o o 


Q 


Q 


Q O O 


-. Q 


■ 00000000000000000000 do 


■ D D O D 


GOD 




r.. 


CD 


ci. o ■-< M n t 


u:i vi 


r. 


CO 0. 




s 


-< M 


pi 


f 


10 


"j r-> 


05 


<>. 


© -- 


M PI ■<• 


ITi 


■0 rv CO ck o 


■^ (-in 


-^ 


ITi 15 p.. CCi ^ 


G 


-< (1 PI 1- 


Ul 11 


(A 


"j 


"5 


"J r\ r N r-. k 


r-.. r 


r. 


N r~. 




01 


05 05 


CO 


05 


CO 


05 CO 


CO 


CO 0. o 


O. Ck o- 


0. 


O.0>O.0k8©©©© 


© © © © © 


11 






-1 


N N N (1 f •) N W f J 


M CI CJ 


M M 




N 


M CI 


M 


CJ 


N M CJ 


t-l 


N M M W W t-l 


NCMNNCMinnripn 


r, 


in PO pi pi P3 P) 


P5 ri PI ri 


PI PI 




_■■ 












id 
















O 

■. 


-I 

n 








in 








© 






K 












r 
















o 


^-' 








•. 








■. 






ll 












1- 
















o 


CM 








X 








PI 






X 




























^-' 


•1 
















cc> © 






1- 












> 
















■0 


■i 


1«. /-.. 






1 








o 

r-.. © 


© 




I-; 












z 
















o 


ll 


x: > 






■. 






Q 


© ■- © 


15 




a 




























1«. 


4ft 


K?5 






f 






Pi' 


in © 05 

--< s Q © 


|> 
0. 




o 




























o 


l- 


K N 












CO Ck Q « ■• 


.. © © 




K 




I* 


** 




■o 


















o 


Z 


O O 






X 






0. 


^ -ij '. G 


1- ■. ■. 








i: 


r 




CI 


fc 
















^^ 


s 


s *. 






---' 






P. 


rj CJ G S © -0 G © 




Ct 




•». 


■». 




N 


4* 
















M 


^. 


x% x% 






z 






■. 


— ■.■.■. CO 


rj © 15 




Id 




= 


= 






i: 
















10 


_l 


X > 






a. 






© 


•0 m © Q © 


0. to -1 




H 




























o 


Z 


••^ -wi 






■. 






■. 


© 15 8 •<• -- 


^ © o 




ID 




K 


1- 




IJ 


M 








IH 








■l 


^.' 


;.:k 






/-.. 






© 


-,< « ^- « .. 


© « « 




a 




U. 

u 


u. 
Id 




p 


1- 
u. 








■0 










4ft 

in 


■c -<j 






■. 




_ © 


■. 
© 


^ -1 t: •■ © 

© ■. T^ © ■. 


© s © 




q; 




_l 


-J 






Id 
















o 


z 


S 1. 






X 




2 15 


<, 


^ 111 •. CJ © 


CJ ■ - 














z 


_l 








ll 










■. 


/--. .'-. 






...' 




=) p.. 


t-l 


IS/ fj 13 -^ f 


'. © © 




5 




Pj 


r> 




* 










•<• 








;>: 


^. 


X > 






T- 




1- © 




^ CJ ^ ■. --< 


G 1- ■■ 




;- 












U- 








1>- 








•<• 


10 


-^ •w' 






IX 




U -3 


Ifi 


© .. © t '. 


© .. © 














"ll 










in 








c 


■. 


:-: K 






■. 




^. G. C-! -• 


15 


■.It- '. tCi © 


CJ © ■- 




Q 




Q 


© 




•* 


•■ 




4* 












■. 


_J 


IT' 10 






.^. 




X ■■ -- • 


C-l 


CI 05 © -- C( 


-. 05 -t- 




Z 










1- 


■1^ 




o 




u 








x% 


a. 


o o 






•N 




..- = .. © 


■. 


PI p.. • ■ -- 


© « © 




o 










_l 


j: 




■* 




^ 








o 


■.' 


.. s 










ii — r: ^ 


1- 


© ■-©•<• ■ 


-,-.: .. in 




> 




X 


1—1 






"^ 




CL 












o 


E 


x% x% 






X 




•1 o r. © 


CO 


- © .. -.5 - 


■11 - ■ 




u 




01 


u. 




u. 


z 




'•. 




a 










a 


X > 










II Ct '- '• 


t 


*. in PI CJ CJ 


'. oil PI 




iH 




•-I 


u. 




1-1 


u 




¥t 










e 


w 


». 


-^ --.' 






z 




.". u © © 


■. 


CJ ^ 05 ^ « 


or; 11 t,--. 








1—1 


o 




" 


z 




O 




■>- 






1- 


n 


x% 


;.-■ :-■: 






o: 




X r © ■ 


10 © 1- -1 © • 


i>l -■ CO 




111 




1^ 


l-l 




•* 


ll 




■* 




M 






*. 


o 


_i 


1 1 






■. 




^ — © 


CJ 0. in - © T 


*. T • 




^ 




ll. 






1- © 


u 




u. 










jj 


K 


CE 


o o 










CI IX ■ - 


\ 


'. p.. '. -< -o 


© -0 G 




1- 




c 


r—. 




-! r; 






o 




1- 








y-.^ 




■. ■. 






ll 




1 =! rorj 


© 


©CO © -CI 


© CI © 










in 




;■ N Id 




■K 




K 






\ 


C 


4ft 


^■w y-: 






*. 




X ■■ Q • CO 


© 


t .. m -1 '. 


*-i ■, ll 




r 




D © 


z> n 






3> 




4» 


-1. 


Id 






1- 


O 


in 


K > 






X 




x%> « CO 


Cl 


s CJ ^ •O © 


■ IS - 








^ M 


LL iM 




PiQ 


■I 




O 


4ft Z 






J 


1^ 


Ol 


'-.' ^.1 






'--' 




I- X - ■. 


•c 


© 10 Q r. © © © <3 




1- 




in (1 


I-i CI 




1- 1- 


in 




■s 


o 


-■ 








K 


■i 


MX 






^ 




X -^ n -co 


ll 


^ P3 ,^ 10 - 


■. ll * 




Z 










li. c- 






X 


■^ 


© 






z 


CI 




PI pi 










U il 1- - • 


.. 


r> -o If) •• ■ 


CJ ■ C'- 








II li; z 


li Z 




Id Ij 


o 




= -J 




11 






-I 


o 


_i 


o o 






■. 




Z n " • o 


05 


CO '. 15 « © 


-O © U5 




Lt 




L. !-■ u 


Ci U 




_l ■■ 


1- 




U " 


z 








k 


■. 




■. ■, 






x% 




•• ■• Z 10 •- 


SO.©©© •- 


11 ..11 




a 
















E4» 


^.^ 


n 






1- 


y-: 


-^ + 


x% ^. 






© 




.-^ .-^ ^ 10 




IV © CO If: © 


13 PI -O 








z a P 


I-I K 




'"' ^ 


> 




a o 


ll 


1- 






1- 


o 


a >c X > 




■. \ *. ■. *. 


■. 




X X z N Ul 


15 


■. N ^ 8 10 


*-i ll *-i 




71 




u o 


li. 






O 




u ". 


11 








s 


o 


» II 






© « ly ri •<• 


X 




^ •— + * « 




8 ■• 8 - U; 


.. CO ■ 




y 




z 


li. = 




l_l 1,1 


a 




li- 


» 


11 






a 


■.' 


^> 


;.:m 




+ + + + + 


..^ 




4ft 4» '^ •■<• 


.. 


■. © ■ ^ CO © Ci. S 








1- Id o 


O « 




* '. 


Id 




U ul 


iH 


II 






<i 


M 


.^ ■■ 


CIM 




X X ><: X X 


E 




in ir 0. in ■- 


© © N © © ^ 


■. ■. ■ 




K 




a. = 


i_i : 




z 


a 




a J 


*o. 






K 




_l CI o o 


10 




ct 




z 1 <• in © 


■- 


■. ■- ■. ■. © 


© G © 








© <T '■■, 


© ^. 




-^ 








1- 


N 






K 


o 




K K 




W 4ft 4ft «t 4ft 






..' ■. ■. 


© © © © © ■. 


*. '. ■. 




S 




^. i-i V- 


CO I-I ■^/' 


■- 


U 4ft Id 




P * 


z 








Z 


■, 


•--(i 


X% X% 


a. 


3 3 3 I> D 


o 




O O 4ft — S 


■. 


13 CC' © ■• © 


© © © 




II 




\- li. <n C( in M 


= 


-J I- a. 




z l- 




Ol 






K 


^v 


4»ld K > 


Id Z Z Z Z Z 


a 




a (t iTi N ^ 


8 M M O- 8 ■. 


*. ■- ■. 




^ 




-. © U. JL- 


C-l D- i: 


-^ 


1- _i a 




bJZ 


a 


O 






_l M O 


<r K 


^.' ^-f 


1- 


■. ■. *. ■. *. 


u 




U Id Z - Q 


\ 


.. .. ■. .. © 


•<•©•<• 








« 11 o 


a 


*>( 


•1 -^ 


1- 




r> •-• 


0. 


li. 






a -- 


o 


n m 


;>; :-.: 


iTl 




IX 




a ct 11 •• - 


T 


in N 10 CI ' 


(-J '- CJ 




^-' 




^-' L. I-i D 


Zt-iQ 


X 


1- ¥t 






GCC 






11 




*• + 




■. 






© © © G S 






.. •• /% in © 


15 


11'0©CI©P)©'0 


-^ 


Z.- 




3 = 1- Z 


Id z 


-^ 


I-I z 


1- 




a Q. 


J M 






_i _i 


iJ 


x%_l o o 


_l 


■. ^ •. ■- ■- 


_i 




-1 -1 0. 15 CO 


10 N CI 0. P) ^ 


■. ■. ■. 


"a 


z 




zz i-ii-idzua 




Z D 


D 








10 


U 




z z s 


-rt o 


•. ■. 




© -1 w ri •<• 


o: 




r n 13 •- N 


\ 


^ .. ■. -.trit n 


« 






Id a. >f\ 


1- D 


t 


2 ' 


Q. 




^*^ 






m 




s II 


o 




x% x% 




+ + + + + 






'-.' Id •• 


PI 


tt■ttt^lD■^i^ 


n 


Q 




or _i ::i = 


11 z 


ri 


O -- 


1- 




- pi 


O 


11 


o 




_l z 


■- 


z o >c> 


o x x x; x X. 


o 




O C 4ft _l -rf 


« T N (0 ■O - 


«3 ti CO 


R 


Z 




z 1- o a 1- 


= a © 




D ■ 


D 






1- 


n 


-J 




o z 


/-s 


Z 1- 


-wi .-' 


i- 


•^ -^ ^_, -.J ^- 


K 




1- 1- m 1- CO 


CO to M m w ■■ 


■. ■- \ 




a 




a I-i i_i = 


1- Q = 


«) 


1-1 CO o 




1-1 ..' 




-^ 


c 


•0 4ft 


». ■■ 




11.^ 


K ;''i 




<ft 4ft 4ft 4ft <ft 






r in N 


s 


\ ». ■. ». © 


8 © © 


R 






© = = ^. 


= = y< 


a 


= ' 


z 




- 4ft © 


0. 




N _l JP5 


^^ 


4ft S 


9© 


© 


3 3 D 3 :> 


© 




© 8 •• a .. 


8in88e©©e© 


o 


s 




© ^. Z V 


li V z 


—1 






-a 


II 


10 


z 


-< 1- 


" + 


:> '- 


zt n 


O O X 


II 


Z Z Z Z Z X II ^ 


X 


II II X O U3 


(M CI T 10 in « 


H VI VI 


^ 


II 




II ••.,' li 1- 1- *t 4*1- 4* o 


1- 


1- 




r 


3 








_i 


z o z >c 




X 




X X 




X X 










x 




-rjizirzixxDi: 


u 


3 Z 3 




r o 




Id H O Q O O 


tj 




Q D 1- 




O D D O Q 1- ^ 


1- 


}- <L a. 


(laaaciaciaa 


T- 




O 


H «Q. 


a. 


4*0. U 0. 


CO 


U II 


a. 


i: X 


1- a 


<i n 


r •--- z a a a X 


cc d (I a (I a 


xci:**xaotxi-i- 


1- " " 


1- 1- 1- 1- 1- 


K 1- 1- 


O) 


L. 


II 


li. U. U H' Z li. 


li. z u. 


z 


z a 


Z 


IN 


a 4fto 


O Id o u 


Id o 


•i:^:»ouidUoididididididOinidooidaoc 


a 


d <r a a a 


<r <r a 


C 


•-• 


u. 


•-■ « n Q. •-• •-• 




Q 


1-, o 


1-1 


M 


O O li. 


a. 


z 


13 ot a o Q r. 


ob-acczb-cccLCLacLZb-azb-ii-zoo 


o 


oaooooQo 



15 N i» O © « (■! in -t- U5 y) p. CO 
.H M « vH (.J CJ t-l t-l CJ CI CI CJ M 
N M (■! M N N t-l t-l t-l t^ CI CI CI 



os-^c-iPi-^-in-or*) 
N po ri P) ri PI PI n ri m 

NNNNNNNWCMCM 



O8^C4P1-<-|ni)P^C0O-S-< 

ri-<--<-*-<--<--<-i-i--<--<-u3ii:i 

N N CM N CM « W CJ M c-l N CJ CM 



CJI»5-<-ini3P-. C0O.8»<C'IP1^-lOi5 

ininiou5inin inini5i5'Oi5i5i5'o 

c-l CM N CI c-l N N CI N CI CM N t-l t-l t-l 



44 



MICRO - The 6502/6809 Journal 



No. 54 - November 198 



GAMES feature! 













_i u a 


1- 







N 




U 


U 












£ U £ It. 






m 


d 




I 


-1 












in z in " 


z 







-1 




1- 














d z d _i in 


d z 







tl 






2 












z 3 z ^ 


1-1 




-. u 






in 


d 












01- 1- 1- 


X 




u 


in 




Id 












ift -1 


*-* 


3 1- 




z in 






z> 


z 




r 


a 




_i -1 


u u z ■. 


u 


Q r 












1- 


itj 




-1 u 


Q ao 


^ z 


_l 


1- 


a 


Q^ 


Q; 




3 






a z 


M i-t in ^ u 




e 


d 3 


M 


u 








c 


o u 


Q 


3 in 


3 3 Z _l i- X. 


• in 





m 


^ 


u 


.—. ^ 


Z <1 




in 


1- o 


a 




z -1 u 


■ 




1- 


1- 


1- 


-1 11 








a 


a 


v-u 


QQCC Z UU ceo 


^ CL 


in 


" z 


u 


in 


d 


d u 




in 


1- _i 


3 


Z (3 


zuza ZOU J 


Q^ Id Z 


-1 





3 




u 


I 




(^ 


<ncL -1 CL 


Z 


•- Z 


d 3 u a z 1- 


DC Z 3 


uu a 




Q 


z z 


Z 1- 






lO U U -1 u 


so: 3 a 


d _i 3 D u. z in 


1.^ 


u 3 d 


C 


2 


M 


u 




u 


-13 3 <r CL 


c u o c 


Q.O I aoo o^ 


in d It. 


It. 


a « 





d 


> Q 


^ a 




_j 


-JO r "I 


Q 2 -11- 


It" d Id "1- 


■.1- 




u 


1- 




1- d 







1- 


a u 1- L. 




o o in 


y z 3 a s =" 


u z => 


1- 


-1 u 




z 


inu 


a b. 






2 1 -J 




1- 


aoo 




^ I 


u 





■T a 


ti _^ 




i 


1- _i 


in 




" :; in 


IdO > 


f 


. 1- 


a 


M 


1- ^ 






o 


u 1- a u 


Ql 




a m z d a z 


X ^ 


■ ^ 


d 


z 




dS 






-J a Kt r 1- r 


u 


1- 


in £ u > u 


. 


■ 


■ — 


Z^ 




d z 


J- 




u 


1- a u a 1- 


g c 


m a 


li.OCZii.ZZ 0. 


_l c z ■ 


■ 


t— 3 


3 m 


,— . 




z 




r G lO U 3 1- u 


r z a 1- 


oudtf c i-i- oa 


-•-I 


■ 


w 




G 


u 


1- m 




1- J a z jr a o 


a « 


u 1- z r 


ocua Z" zd 


c c u ^ 


z 


^ 1 


B X 


1- 


00 


— u 




ICO u u o z 


r a 


a u 1- 


UQ:dl-OI- UOZ3 dZ 


X d :> c 











d 


3 X 




1 u 


ic r a « 


o o u :- o •- 


odiuain QO" 


m z I ^ 


^ 


in 1- 1 


i»-i P 


■n 


z in 


•■ll 




-J 


a. -11- o Q u r 


-1 


z a: in 3 


■-"-iiriad — tt > zi3 


I c^- 





z u — 


13 <r 


^ 


.. 


U 1- 




-1 > u a lO ar u m u lO 1- u u 


in «i _ii- in _id> cz 


=> o u 


a 


5 -iidz z 

(T 


1- 


r- 1- 


C lO 




w C 


i-zzaaai- diui- 


o z 


dCU U UU3d i-ii-i 


c u 3 a 


G 


M 


■0 n 


n 




r "I 


o 1- i-i u > _i <r _i u. > " o 


z azdijt zaz:3 i-z 


> u c u 


3 « 1- ZX Id 


.. 


> . 


u z 






° ? ~ fc fe fc t ItJ (03 wo _i£ c 


l-ltOI- l-^ZUU Ol- 


z > r 




^ z 


^ 


■0 








-J »i 


00.0. o ceo oa 


■I z 


w w a 


ac it.u oinz-oo uc 


Id -1- 


U U Z did H 


a 




u 




_i >-> 


u ua :■ ai-az 


z z 


G dZGin c d 1- d d az 


lCi>> 




3 a ^ 


d 


*"l z 


z a 




<z 


rddiwooo <nina-' 


o d r o 


ro "I mu m'n "^ 


><LI- 







;— . 


u 


Z! <fl 


1- d 




E 1- 


1- z © = o z m 


1- 


O U. 1- u 


zi- QiTi ejininjoQ 


d z a J 




w .. 


a 1- 


a 


d 






m « 


z<i u uztxinvi 


ct •- a 


U U d 1- Z ^ Id 1- Z d d _l z 


r z ^ 


Id 3 


■n 


a 


a a 


a 




1 


>or^ u ua- 


^ ZT 


in 3 <r 


X muz X i-iaaudw 


1 U (^■ 


in 


a a u a 


d 


u 


u 




<i 1 


01 uini-_;i-z UZG 


1- ^ I 


i-i-uc c i-ini- 


Id 1- z ^ 


d d c _ 


T- t.1 




1- ^ 


3 u 




a 


u aini-inCii--iO-iiJzzin 


mtf-ii-a -.inoi- JCin 


a > m 1-1 


»i ^ 


^ -- 3 1- L- 





z u 


G X 




u.uua-iauinaHui-a 


a c a 1 


Zdd ind zzi-izuzc 


U vs 


Z Id H 




a 


u in 


1- 




oi-i^<z'_iazixu>-<ii:ina:oaficuo 


OU UUdl OC3CaG>-iU 


X U H z 


H a 


" Q 1- 


d 


:> " 


^ 




% 


a <z^ u £ o <mz 


r: d 3 Q 


Da3 ai-_icuao 


1- U. 11 u 


> u 


3 U I _ 


z « 


D 





G 




ft =^ 


w' z o u u u o 


O H il d O 


LluCdtd Idd UJ«>Z 


d ^a 


z z 


G Z OCT 


•3 t 


d a 


> U 




o 


:;oin zurum 


U -1 


o 


oi> ui oinddinz ^d 


m H d 


i-d 


■z 




u 


-1 




i-uo> ui-ri-r u 


r 


u u z 


QI-*ZIH ^^ DNO: 


Z i-t ^ 


1- 


> -z m c 


c 5 


U K 


in d 




.. ? 


>*<rz -H '■t- <L It- <L 


X Z d d 


U". .. Ol-^ ldUC>C.dO-^l- 


>- > 


Q I 




u a 


z 


oj u 


3 u 




UI-» '. -HCy '. O '• •>(- 


.. ^ 


1- 1- V ^ 


-!©»> '•© -IZ.DD ■■ ^ Mn 


X a u ■ 


z 


5i > a z X 


" -1 


.. 


G I 




r • 


•• Qin ^-© >. sm ^ 


e p. 


s .. © © 


^ri«e^ i-^^edr- 


1- u 3 ■ 


>-. u 


_i 00 1- 


X. -1 


r, id 


a 




1- e 


O s-rt© V s-*- -. CMSNN 


-«■ © ^ ^ 


©do ^ ^ ^CJOd '■'S (C ^ ^Dd 


U3dldli.UU-lli.l- 


CLiZ r 


X wi 




m - 


'■■'<! ^ '- © (0 <N © *■ ^ 


'. ^ 


CM ^ P, © 


..©©©ro. ©roro©©»- 


Z XI- 


m £ I 


d 


li. 


■I C 


1- d 




^ZGS-^SS •• -< ^ ^SS'Oi-J 


^m w ^ 


©zt ^ ^ ^ '©z ^ . . ^ ^Piiri 


CH mn 


d m 1- 1- 


-I 


1- in 


I 




® o ^ 


*^ y ^ ^Ui ».C0O. '. ^ 


N N © N MD 


■> P) s © © 8 ^o©©©<«'©r>^ 


in 1- d 


^ 1- 


1- 




1 a 





^ 


^ GSSNS«S«'iOS 


s .. 


S..8CM8 ......^sb) ^s*. (M.>.>LJ 


z ^ 3 


z ^ 


u V u 


> z 


Q 


a z 


S U ^ 


'. ». ^ ».».*.'.». ^ ». 


© © 


© © ^ s 


^u © © © » -0 r> u © © © ^©na 


*-| z 


Q z a lO c 5 3 


a " 


Id u 


d a 


3 

.2 


•. ctse<o "-osesooo 


.. .. 


-. Kiy. IS 


© a s .. .. r, m -.a. •■ ^ --is ■■ rj u 


- in G d 


" in 


d 


u X X u 


3 d 


s a - 


>.*4©^N ». V ». K ». 


© © 


© © CM ^ 


vd«-© ^ .. ©a©o. 0.P5© ^i 


u ^ 





1- H 


X I 


z t- 


1- z 


iji 


^ t 


© ». K -^ ^©©©©^ 


.. .. 


...... 8 


S -rl^©■«-^ ^r)rl^^PjH 


at- 1- 




in ^ Q 




>z u 




a 


*J 


th 3 *-l 


•>©©©© ^ ^CM '•-< 


8 8 


8 s © n 


•> 3 V s© s P) © 3 © ^ ^©© ^ ^ 


U d D d D 3 


Z d u D 


z 


> ri 


U =1 


5 


». O "^ 


n •>>.■. s i>> -H •. «o • 




........ 


(VONP5 .-b"; ^ -o .-«.«? •- ^n = 


rroxoooou 


10 


r a 


I 


O 


<!■)> t 


'^©©©©NN©»ss©©8©©N>r<n©n©©>©p>p>©©p> = 


H 1- > 3 


> > 1- Q a 


1- > 


d 111 


1- ;- 


1- > 


JO 


« 








• -» 














Q 




aaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaa 


<L<L<L<L<L<L<L<L<L 


d d 


d d <r II 


Z d il 'O 




l-l-HI-l-l-l-l-HI-HI-l-l-l-l-l-l-HI-l-l-HI-l-l-l-l-l-l-l-HI-l-H 


l-HHI-HHI-HI- 


1- 1- 1 


11-1- 


1- 1- 


n 1- 1- kj 


O) 


aii<i<r<i<r<r<rii<raaaa<r<rii<r<r<r<r<riia<ra<r<r <r a a<r<r<r<rz<r<raaa<raa<i<r<rr(r<r<rii 


Zdd I> 


c 


ooaaoaooaaaaoaa^aaaoaaaaaciaaaaaaaaauaaaoaaaaa 


» 





Q •! 


% 


[\ to O' 


o - w n •<• in vi ^. » c. 


© - 


Nr;tin'0N<DO.©«Nr)-<-in-oi\(D0.©« 


(^n■*■v>•or^lDO•s 


^ tN 


P5 ^ 


b5 ij 


p.. 0:1 


_l 


•0 --J .0 


r, N r-. N r. r. r-. r-. k r.. 


OI!D«Dirj«>l»00«>«>in(».O.O.CVO.O.O~0~0.0~8© 


© 8 © © © © 


© © « 


^ ^ 








n ri ro pi m m r, ro ri Pi r, ri ri 


p:irip)P)pirirp|>>riP)P)r)r)rpr)P)r)rir)P)-<--<- 


■<•■<••<••<• 


■<• ■<• 


•<••<••<• 


t -l- 


T T 


T T 


T T 






© 


in 

© 


© 












S 


§ 






o 


in 




.. 












n 


a 






o 


■<• 


.. 


•0 


© © 













ll. 








*^ 


■<• 


■<• 


^ ^ 


















VI 


e 


\r> 


<M 


e © © 






u 




_l 









*^ 


». 


<a 




© © © © 






u 




-1 


z 






<s 


© 


© 


^ 


8 N -OS 






a 




d 








CM 


© ^ 




s ©■«© t ©o-n 






1- 













M 


^ -o 


.^ 


^ ^ 


0. ^ ^ © © .. ^ 










z 


d 








•0 t 


© 


V> 8 


^ 8 © V <0 © © 








1- 




u 


in 




». 


t 'O 


^ 


in 


© s ^rp 0. N ^ 








d J 




-1 


-1 






8 CM •■ 


© 


© ©N© ©© vM© 






d 


_l 


ll. 




_i -1 




■<• 


'OS - W 


C'J 


© P) V 


-■0 ^P)©©«)^ 








Z n 


u. 


in 


d -1 




© 


© ^ •> © '■0 


OO 


s V -0 


00 ^©©in ^N ^© 






ii. 


z 





ij 


3d 






8 © 8 ' © 8 (M 


.^ 


in © CM 


.. 8K^^b)"©^ 1- 









u 




z 


3 




S ^ 


T B m © - 


8 


in ^ © b) 


© ..-o©©**© ..8 in 








-r- 1 


u u 




a 




-. ■<• 


in©-^©©© ©•<• 


S 


s © ^ .. 


^ST V •.10 V© v©U 






a 


P J5Z 


z 


Id U 




© N 


^ - -o ■<; m •> - IN 




D ^O f 


© .. CM - s Pv © •■n '-3 









d d " 


UI 


U 3- 




Gi OO 


8 s ^in8©©©('j 


-.1 


.. © IS N 


^©-CM ^ ^ ^©©CM . 






H 


It. z 


a 


X d 




r.. '. 


-. 8 © « K in V .. s 


., 


S MNOO© ' ^-O©©© ^NM_I _ld 


d 






cm 


u 





in 'J 




>N " 


8 '. ^ >■ '. K © N - 


© 


' S CM ^ 


st-8 ^-^^ ^ '-©-<P)dZIJZ 


a d « 




Id 




d 








^. v< 


-©©©oininu-)- 


C-J 


© a ^.^ 


©CM s®N©©-<- ^-3czi:ri. 


HO 




X 


u 






u 




© - 


© ». ». s ». ^ ^ © K 


IN 


sbl © •« 


•0 .. ©OO - - -.N© ^** ^ ^.C_l 


^z m = 




1- 


U d lit 




X 




'irr 


^©©©©©niio 


^-t 


© ^ ^.^ 


CJ-^ ^S-<-©© -'«-0 •- •.CL <Z 0: (L 


C 11 » ^ = 

a 3 ^D ^ 









1- -1 




1- 




O '. 


© *^ s ^ -. ». ». \ *^ 


.. 


. n © -0 


^C!©Mn •.«!■* to .. I-ICOU ^3 




a 


U b. 


u 








' Q 


'8©©©©©MS 




8 © '. -. 


■* \0 •. sN©N'0NOindi-_IO ^ 


_l ^d c 




d 





u z 


> 


X 




© u:. 


t >. ^ ^ '. ^ >-* © 


T 


* b) Q •<• e .. © s ^ >-j •> N ^ -. "1 1- « * r u 


M- -1 Z 3 




u 


m 


c z 




<• 1- 




^ ■<• 


8'«-'<-©Q©S©-0 


8 


^ -. ^ ■<? 


M© .. b)-<p---<- ^-oou-* ^ MnQ.inda-»u. 




z 


^ UZ D 


d 


" z 




Q '. 


^ rj iJI; ».».'.». ^ ». 




s 8 e s 


.. N •<5 M © ^ (M © -0 ^ . ^ > a •» 


3 U ^ - * 






a d 1- 




Z 11 




'■ Wl 


- r. t w -< o s ^ in 


^ 


n © © -0 


© r\ C-J <o •o n 00 in -c z a: u >- ^ - 


z ^ii. a ^ 




I 


u » 


a 








O -H 


© K .. « oc - ^ - - 


v< 


CC- 8 b5 '. 


bi -0 b5 ^ '. -<5 •.-co- ^ D :£ U. 1- _i » C d = 







1- in H X 


X 


X 




■■ oc 


m o © CI cj © s - c- 


r^ 


t -O •■ If) 


•<• s ^©sr.©N ^CMiii- •- Mi« 


sG « = 


: 


i 


d 


Z 1- 


r- 


> 1- u 




O IS 


C4 u:i ui ■. ^ ^ ^ t-.. © 


p.. 


^ ^ n -< 


•<5©©-<-o(5 ^b5 ^©©-iii .. (i:>-i3a 


Z U. S V ^ 


= 


2 U U I 


n 


d 11 1- 




u:^ - 


inN<vi©so©iri-< 


in 


8 © © c; 


^ b-J l\ e. 8 -O ••5 S M IS .. 1- 3 a .. ^ 


w v« 3 


.. 


a 


■r 


3 


2 


33a 




■:>• ■■ 


' m m 10 B ii:p '. > ■ 


.. 


u", © b) © ® - P. © p.. ri N © 01 ^ z u 1- m o ^ 


U. -1 3 11 


s 


lO 


U H Id 




1 I 




■<• s 


© ■■ '. tl (■< CJ o s s 


© 


ic e - « 


8 s -0 - .-C-J -■ ■* © © 1- U » * C d 


^z in a -1 


= 




Z 


X z 


Z 


u z 






•■19 13 111 10 10 10 '. -. 




B n 0. -. 


L5 . '. © Ps 15. -< -0 D .. .. .. _l in 


d 3 '. ^ -» 


.. 


in H d 


1- > H a 


a 


J a 




e o 


© '. ^ ■■. '■ -■ ll> N © 


■0 


.. ^ in 8 


0. ••; s © . ^ ^ .- ^ CM c r ^ ^ 


11 .. U 1- •> 


s 


Q in 


ti 


u 


W 


d u z 




■ o; 


in in in © 8 8 b'f n k- 


^ 


© ITi ■■£! •■ 


.!> '>CM©©b5©©0OindCflL3U 


a z z d = 


s 


G u z 


> 


> 3 


•n 3 




O iSi 


o; © s ^ ^ '. ' .P5 8 


CJ 


^ Hi © 


© p, © C-J © ^ ■<; N ^ ^ . J iTi d d a 


^a di = 


^ 


c a 


A lO d 


d 


•n d -0 






in 05 'c< ©©■<:■© (4 - 




C-J iN ^ C-J N ' © ^ f-J Pv i> - © © 1- '. ^ V O O 


ij d ^ .. ^ 


s 


3 


z 








d u a 




t •■. 


' » » Uj B © '. ' ■-. 


.. 


CJ (0 © C-i 


-H © Q p.. C-J P-v ffii ' ^ Z Z ij _l ^ •> 


« ^ I d in 


: 


U.U 


u » 


u 




a 




ii:i Q 


© ^ ..-©-©88 


8 


n .. .. -rt 


00 ..•0 8 •■!> •. '- 8 © Id D i-> Id I-" w 


li. z u « 


.. 


ic a 


a a a Id 


-1 


U -1 




*■ -0 


-. © 8 -O - C>. 10 *. fj 




-rt 8 © s 


.. © ' p:i © ri © © 8 s •» -i _i ct ^ z 


* H i;-! a ic 


= 


i: d 


d d il u 


-1 


3 ij -1 




o o 


© ^ '. ^ '. ^ in © © 


©' 


.. .. © 8 


© ^ © .. .. ^ .. .. C-J V: *. .. >- -Nt G >-• 


mTi •» .. ^ 


= 


I a 


u 


a 


d 


a d 






' 8 S 8 S O C-J ^ -■ 




8 8 0. 8 


.. © .. ©s©o©-P5rzo . .. ^ 


U ^ ^ D C 


.. 


I d w- 


= _i 


Zi d 


z 


-1 d z 




Q • 


© ^ V V K ». 8 '■ 


©' 


.. .. .. v< 


8 •<• s -.;. .- .. .. .. .. ^ 1- 3 u _h in ><: Ql Q ic u 


= 


1- Q 


00 


-1 


in 


-1 iTi 




' p-.i 


> S S Q © © 8 » P'J 




8 8©'- 


.. ■•5 ^in©©©©8©acoi-i-id 


d G d in _i 


= = 


> 


> 


> 




d 




s •<• 


IS, t t : : -. . - •<• 


■<i 


.. ^ ». .. 


8 ..© •- .. .. .. .. flO .-co ..iOXCl 


^ X -1 '■ .- 


.. = 


IT IZIt 


• d Vd 


d 


^d d 




' O 


'. ^ '- © ..© 8 8 *. 8 


•*■ 


©88-^ 


.-<• '. -ir. 8©© — oz ^1- V ^ .. 


-1 - •> C d 




•.•.•. 


.. .. 


^ .. 


.. 


00 s . 




© « 


^ 0- '> '• ' '• '. © -H 


© 


.. 05 .. C-I © 10 ■<• C-I B s ••5 ti - '. .. d d o a O 


1 > ur :> 


= © 8 © » 


8 88 8 


00 


..© © 




». s 


fO -«■ -«■ 8 S © © t ' 




©■<•©» 


■0 -ii t U5 P-, © N N .. © Ct C Ct X O 


ic d a c " 


.. . 


....... 


^ .. 


^ ^ 


.. 


l> V s 




T (M 


.. ^ ...... -t ^ .. CI 


. 


.. .. .. .. 


CM . . . . • ' • n .. •» Q 1- in ■» m 03 ■» ■• 


= © 


8 8© 


© S 


8 K 


O' 


s© © 


3 


r^ -.;■ 


Si t ■* ■* ■* .. ©not 


T 


C'l P5 © -<• 


^ CJ - C-J '-■<•-■<•«)© ■■*^^^^ 


.. .. .. ..it 


= . 


.. ^ .. 


^ ^ 


s ^ 


V 


© s .. 


« © 


U> w © -o "«■ 0(? .. <0 © 


(1 


© 05 s CM 


-«- C-J C-J -C © O -0 -«- « .. > ^ U. 2- U d d 1-1 d u 


_^ © CM b) © 


© 8 © <D 


OD 


- © 


^ ^ 


CM r. -"J ■<• rs t 8 -< -< 


CO 


Px T © <D 


<D'«-iribj'0'«-r. N«QZQ.ii.za3oa;flL03 




....... 


.. .. 


^ .. 




.. .. .. 


k k 


ii:i .. .. .. V .. .. .. .. 


.. 


.. .. .. .. 


.. .. .. .. . .. .. .. .. .. I 3 i-i 1- ici 0. 1- •« 


= S 


« -rt © 


© (M in -c 


N 


00 (»> 8 


n « 


.. QGS8©©!):. -■ 


^ 


OCi « P5 -< 


8 CJ S -«■ © T •O © b) © ' .. .. .. . . 


........ ^ 


.. . 


....... 


.. .. 


.. .. 


^ 


.. .. ^ 


^j 


•<;' " 


©inb'tinioin©©'^ 


^4 


-■ OCi C-J fj 


b)riPxr\ooocip5B'«-©i->-iOfl:^UH_i'-'i-ina©-<--<-© 


© e © IS 


00 


OO © 8 


5 


Ck ^ 


IT' t-i w f-i u CJ T r-, p.. 


P-. 


P . OCi © -< 


■<-'OKK88b)'00005 3_|i->3>-ildl-ldOCD'-i 


li . 


...... 


.. ^ 


.. ^ 


.. 




o 


■<• 10 ir 


i T 10 10 in b'f b'f in in m 


b~) 


b) b5 ••5 1:1 


•0 ti -o -0 p.. p.. p, ^ r, K a; a iH u in d I Q u. s 


- N © 


« © © © in OD 


40 © © 


^ 










<» -» »<» * 










^ 






n n <c 


iiliiaadddcra: 


a 


iz<r<z<z<z<z<z<r<T<r<z<z<L<L<i. <z<z<r<L<i: 


IT <r <1 IT <L 


d d 


trCL <L 


<r <L<1 <L <L 


<L<Z IT 




l-l-SI-l-l-l-l-l-l-l-l- 


1- 


HI-I-I-I-HI-I-I-HI-I-I-I-I-I-I-I-I-I-I-I-I-I-I- 


1- H 1- 1- 1- 


1- 1- 1- 1- M 1- 1- 


■ 1- 1- H 


O) 


a: d - 


■ diiiiiiddiidd 


<r t 


<Z<L<T<r<Z<r<Z<LIZ<Z<l<T<Z<T<i:<LiZ<T<l<L<li:<r<T<ZlT<T<L<T<r 


d d 


d d 1- d •- 


1 d d d 


c 


Q D ■ 


00000000080 Hj 


>OOOGOOOOOOOOOQClOOGOOaOOOOOOOOO 


000000 


000 


.2 


r\ «:■ 


o- © -■ C4 p:i * b7 ••3 p.. 


o;> 


Ck © ^ C-J 


p> t bi -o p.. (0 0. © - CJ ri -«■ in -0 r. 05 


0. © - CM P5 


■<• b5 


■V p.. 00 


0. © 


- N 


P5 


T in -0 






'-I i--i CJ C-J N CJ C-J CJ C-J 


C-J 


1^1 n n n n n n ri rr r> n t -t -t -v -t ■*■ -t ■*■ -t 


T b-j in b5 U5 


b'f b'j 


in b5 bj 


b) -o 


•0 -o 


•0 


•0 -o -o 


^ 


p:i p"j 


ri PI ri n vi to ri pj p-i 


P'.i 


Ti ri P") r.i 


p-j pv P) p:i p5 ri P5 ri r> r> po ri ri p5 ri p-j r> r> r> p5 r> n r. 


n ri P5 


on p-j P) 


P) 


np) P) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



45 



GAMES FEATURE! 



5 



w 
^ 



E 



a. 
a. 
< 



a> 

c 



o 

c 



c 



3 



LU OJ 

< H 

LLI i: 

CO to 



E ■ 

o 

o 



' E ° 

>- -i "a 

cr "^ ra 

0. -O CD 



CD Q Z 
' 0. 



I- CD 

X : 



m o 

■O CO 

< ~ 

^ I 

o « 

a CO 

O CO 

qI a 



Q "2 



"O 0) 

CO : 



CO 



r^ -I- n 



E 

CO 

(5 



CO r^ 

CO <r> 

CD O 

? O 

^ LU 

Z 2 

- o 

CO X 



X 

I- 
o 



3 
CL 



3 
CL 



3 
CL 



E i^ 



S u- 



> en 

- C\J 



h V « 



X 51':" 

T. ° ■ ,0; CM 

■^ CO ^ 1- 

!^ CD CD CD CD 

I I > X > -^ 



T- c^J CO ■^ 



5 h Q 



^ 


Q 

1- 




0. 

z 


_I 


z 




w 




rr 




1- 


c^- 


CL 


en 




0) 

F 


^ 


CNJ 


< 

LLI 
DC 


CO 

c 


IT 


m 

CD 


\T 


I 


j) 


fA 




u 


Q 


Q 



ID ^ 

^ « 

CD ■> 

3 : 



o 
■o 



5 < 

go 
>- z 

o < 



^«<p 



O 



Q- o 



Q 



cc 

CL 



ILl 
X 



CL 



+ 
CD 

:^ 

LU 
LU 

a. 



CJ DC 

■ ■ I- 

LU 05 

°^ 

■ ' m 

h- 0. 
X I- 
LU ^^ 
2 Z 

. . LU 

g-' 
^i + 



t^pt 



I- o 



I DC y= cr 



te LU DC 
Q DC 0. 



z z 

DC 
Q- 



t 1^ 

DC 

CE O 

a. LL 



X 3 
DC CO 

o o 

u.. (D 



CD 

C\J 
C\J 



X 
I- 
o 



DC 
CL 



DC 

a. 









1— 


r— 




DC 














_l 






n 


































Z 
lU 


Z 

LU 

n. 





ill 

CO 

1- 


? 












LL 






z 


< 












Q 

1- 




DC 
CL 


1- 
Z 




LU 
CO 








i 


^ 




^ 


IT 




IJ 






in 




CC 


C31 


t: 


0. 




_l 






C\J 


CD 

F 


0. 


00 

C\J 
CN 

CI) 


LU 

1- 


_l 











C,\J 
CD 


CO 

c 

CD 


IT 


cr 


1- 



CD 


1- 
z 






CD 




X 


q) 


w 


II 


CD 


DC 


Ill 


LU 


Q 


1- 



II 


ID 




Q 

1- 


Q 


1— 
X 


2 


2 


^ 


3 

z 


■? 


Z 


DC 


^ 


t; 


u 


III 


to 


Ill 


IT 


f 1 


in 


LU 


X 


X 


DC 


CJ 


DC 


0. 


LL 


DC 


z 



cDCMi-cDintjiocDr^cxjOi-iMer) 

f^-^CDCDf^-^CNJCMCNJCNJcrOCOcrOCO 
T-T-T-T-CMOJCMOJCMOJCMCMCM 







1^ 














kj 

r 





y 

I 


3 












X 





* 
1- 


s 


M 


i 


s 


> 

y 


-s 


^ 






irt 
















1- 


1- 


K 








e 




z 


QJ 


1- 




«1 


X 


a 


j: 


♦ r 


1- 






J 


LI 
















d 

















Q^ 





(O D 


a 


• 


-1 


X 


->t 








z 


Z. 












It. 


— k. 


z 


m 


Z 






». 


S 


3 









1.1 


m 




? 


g° 









1^ 


<L 












11. 


<n 




in 


M 






z 


*. 


X 


k. 


m 


». >. 


a 


y 





> 


1- 






r 


















cc 


> 





X 






cr 


H 


y 







y n 


K 


M 


z 


!!J 


S^ 








i- 


l- 














u y 





a 









y r 


z 




k. 


M 


in 


^ 





X 


y 








10 U 












in 1- Q 















^ 


z 


1.1 


K 









^ 


-1 




„ K 


_i 






_i 


kj r 


D 










*. 


1- •-■ 





d 


_1 






d d 


3 


1.1 




_l X 


I 






■0 


X 


1- 






-1 


r K 


^ 










K 


n m 


m 




1 






OCT 


*. 


D 


~r 


0. cr 


i= 




<r 


•. 


S z 


<fi 






d 


I- 


> 










i-i 


X 


». 


y 


> 








M 1- 


v4 


<n 





y 




k. 


^ 








<L 








m K Q 








z> 






11"! y 


e 


-1 


OL 






y a. N 


N 




1.1 




3 





£ 


ct 











•/I 


a: u z 


y 











Q 




*. 


K 


•J 






r 


^ 


». 


a 


1- 


•^ X 






n 


a 


Q y 








-1 


_i z r r d 


K 






> 




Z 


kJ K 


X 


m 








K 


> m 


X 


y 




k. » 


z 


c 


». 


3 


Ui3 


y 






n 


m (- (- 


».! 


in 








<I 




K 


n 


S 








a. 





^ 


a 


K y 


1.1 


n 


X 


l3 


:£ Q 


X 






u 


z: I q; 


03 


1^ 




Q 


H 




P z 


<r 











fe 


y » 





-1 


y 


n a: in 


k. 


Aj 


^ 


•. 


u y 


•« 1- 






r r (- u c 




z 




i3C U Q 1- •-• 


z 




z 






y in 


k. 


P5 M 




,00: 


k. 


» 


r 


N 


■0 -1 


1- - 








> = Ct ITI 


1- 


i-< 




H 


Q a. 





X 


y 


n 








_: m 


X 


(>< <n 


1- 


000 




*. 





r) 


J^ 


-IS 






u 


d n 


in 2 




-T 


1^ 


C iCl u 


in 


I 


». 




N 


a. 


111 11 


Q 


» « 


m 


j.Q r 


s 





X 






X - 






r 


K u 03 2 :; 











a 


-T 


3- 


y 


1- 


vq 






c 


_i 





in •> 








*. 


« 


X 


a 


a> 








D r n Id 


T L. 




K 


U"! 


in 


Id I 


r 


*. 


v4 




». 


1- k. 





_i* 




3 Z 1- 


2 


1- 


1- 





*. QJ 


n 






1- lO 1- <j 















I 





s 


». 




». 







k. 


_i -< 


y 


y in 


y 


ll 


ifi 


CC 


e a 


1- 3 






^ 


•> > ■IL 


1- 










kj 


1- 


K 


*. 


cc 





y 




I 


». 


n ^ 


(T 


Q a y 


a 


A 


u 





~ S 


^-^ 






1)1 K G q: U D 


na 








w 


^ ■>. 


I 


X 




*. 






-1 1- 


e 


3 a. 


n 


00 







:^ 


X 


cr z 


Q G 






u 


r K a a 


13 


n 








n 


ct •> 


Z 


£ 








y •-■ 


*. 


3 


CC 


ij 




y 





« 





"^ 9. 








Z C " > 




_! 








a 


U X 


V 


C 


Q 


T 


f_j 


r 03 


y 


y 


« 


z z in 


^ 


CC 




•n 


9 1 


a 






^ 


M « in Q. 


kJ k. 




'■^■ 


*i _i 1- -0 a 


1- 


K 




n 


^ 


1- 


I 


•il 


X y 


^ 


M n - 


■I 


1^ 


y 


»i 


Q - 


H 








L. * ' z 1- 








z 


—1 




a ko 


*. 


^ 


5C 


Q 


*. 




Q 


a. 


K 





- z 


*. 


0. 


^ 





-■i^ 


Z 


(C 




5 


in ii in 


K 


U 




►.1 





n 


3 X a. 




I 


a 




1" 


cc 


in y 


f\ 





». 


z e 


N 


r 




Of 


-" y 


p> 




in 


u ct z :> c 


^ 


-r- 




-1 


z 




a. -■: 


q: 








|;1 


-i> 


I 


_i 


i 


Z >-■ 


X 


■I '■CL 


M 


I 


ffl 





y -' 


z a 


V 




Id 


<r 1-1 _i 


in K 




2 




r 


C C Q 


y 


d 




!.< 


■.I y a _i 




CC 




X y II 


V 


-^ 


n 




y y 


a 


m 




CL Cl u r u 


LL 






II 


fi 


1- 


Z K Z 





C 


> 




il II"! 


z 


^ >.i 


•^ 




Q 


CC lO 


Z 




a 


CL 


^° 


G 


13 






U Q. K r K 


u 


LL 




a. 




».! 


%u 


z 


K 




y X 1 




M k. 




1.1 3 




y I.1 




n 


QC 


y 


f\ <- 


X z 






> 


« a u K in 


K 


H 




G 


,^ 


2 


y ?^ ^ 


ii 




^ 


J 


Z ! 


a 






K a; 


X 


0. k. y 


k! 


». 


1- 


^ 


„ "^ 


a 


3 




IX 


L. I z r: 


a u 






a 









.^ 


y 


G 


:I U 


3 


"ty 


y 




in 


C X 


k. 


N 


« 


-1 


Q 


ll ■ 


13 




■I 


•n Q u - 


•a 


r 




cc 




in 


I q: 




Z 




1.1 


CL flC 




X in 


I 


k! Q 


y 


ct J K 




N 


•. 


iM 


y X 


^ s 







■n 


il « nl ct 








u 


n 


Cl 


X 


1 


1-1 




CC 


K y 


I 


_l n 


1- 


k. 




Z » 





». 


N 


in 


ic 1- 


© '■ 







II"! 


n = 





3 




o 




I 


1- a 





N 


11 


dH a X 





M C 




d y 


CC 


<r « K 




•\ 


(0 


« 


Ci Qi 


•> X 


». 




u 


m n 3 Q 




Q 


— 


►.1 


> 


U 


D c 


z 


il 




3 






a i: 


a 


a. r 





•>N © 


K 


3" 


*. 


*. 


c 


Q 1-1 


IT, 







il K G U > 


in 


;- 


K 


a 


03 


a 


u 


».! 


-1 


V 


a 


■J y 


I 


xc 


z 


K 


K 


s <r - 


N 


i: 


— 


N 


_l 2 


* ? 


ri 




Id 


3 M Ct lil >■ 


t-* 


». 


>.i 


g"! 




a. 


> 1- X 


z 


d3 


». 


CC 


Z ij: 


1 


»o 




*. 


m 


'■-1 X 




m 


£ 


l>7 




S ?■ 


*. 




r 


^ r '. iTl 


r 


— 


IC 




Z 


n 


K M 


z 


*. 


a 


Q 


1-1 3 


1 


m £! 


I 


N J 




XiO 11 


^. 


X 





•k 


n y 


^ i 


■n 






K Z K 1 a 




K 


1 


Ii' 


u 




0- _l IJ 


».! 




II 




1- in 


J 


_i 


y 


•« Z 


CL 


> M 


Z 


_i 




X 




» 


13 




u 


1- G ■ 1 a 


^ 


J 


IC 




K 


:- 


•- ? ^ 


3 


I_ 




y <! I 




-1 n 


lO 


». M 





y d Q 


i3C 


_i 


13 


ct 


Ei •- 


in 


M 




■^ 


V 3 — 1 lO 


».! 


X 




5 


K 


_i 




m 




U"l 


X 


y y 


5 






XQ 


a 


X X 


3 


3 




gc 


P) 


in in 






K 


i: > in 




U-1 


n; 


z 






"i-l 




">J 


1.1 


K 


1 a: 


3 


Q. Q 


y 


y -1 


CL 


XX « 


X 


5C 


C 


^ 


- z 


3 y 


£ 






> _i i: Q 







1 





Z 


u 


u IN 0. 


c 


il 




*. 


Z 1- 




CJ 


ij 


y. c 





■n 1- Q 


» 


in 





X 


> 










U 


c -1 -1 a _i 


a 


1(-| 


1 


11"! 




Q 


a -a 




Z 


y 


©II 


y 


•> 


n 


11 r 


X 


> -1 2 


Z 


». 


1 


« 


n 


■1 2 







I* 


113 _i =■ u 


5 


z 


m 


K-l 


1- 


g 


y in a 


T 


X 


.« 




z y 




z 


in 


X 




y 3 


CC 


r. 


1 


in 


3 Id 


'-^^ S 






II 


il 11. Q. 




a 


> 


G 


in 




cc y Cl 


1 


X 


Q 


Z 


3 


P 


1-1 Z 


m 


y y 


k. 


X r 


3 


M 


a 


fi^ 


S!5 


in a 


K 




X 


LL z Id in 


5 


_i iz a 




?! 


■y 


ij 


i 




CC 


k.H 




Q.H 


ii 


X. a. 





y <z 




». 


y 


I 


Q 


Z Cl 


M 






U 11 u 




II"! 


IT! 




~i 




— cc 


z 





Ct 


II 


y 


z 


U 1-1 


a. 


ii 




M 





% 





d3 


y 


C- 


•. 




K 


X L. ir _i r 


u 






ll 




^ 


D 1- X 


►.1 


il 


s 




_i 




y a 




CC 


iC 


Z H G 


y 


z' 


z 




G -1 


a d. 


m 


^' 


k. 


K u _i 1- 


r 


CL 


Q 




u 


c 


y • K 


> 


in 


3 




_i 




-1 


1- 


y 





ii _i 


_i 












Z 3 


a 


^ 


"?- 


2 a =1 


1- 





iZ U 


Cl 


1^ 


in -i ll 


■I 


a 


■I 


y 1 


J 


in Q 


y 


-1 x 





-iCL y 


y 


d3 


G 


_l 


Z CC 


3 k. 


y 


3 





z 3; u 










u 


U 


a 


iri '3 


■n 


s 


CC 


X 


1 




z 


q: 


1- 


113 


CL UH3 


3 


X 


1 





uy 


(.» 


3 


.C 


G 


a > Id in 13: 


u 


D 


1- 


U"l 


Z 


03 


11 in 






G 





X 


1.1 


<x 





1- M 




CL CL 


y 


IT! 


1 


i_i 


0. X 


Z 1- 


03 




Z-- <z 


I;- 












7:[^\^ 


z 


£ 




QL 


z 


z 


" tx 


y 


a X 


<Z 


y -1 n 


-> 


y 


Z 


* 


° t 


11 2 





1 


D 


> 1- il U 3 


a 


u 


U 


3 


Zi 


u 


U 0. 


ij 




,f kJ 


113 in ij y 


IJ IJ 


in 


113 1- 




Zk. _1 


« 


z 





•. 





■. ii 








GL = U r Id 


u X 


X 


p 


X 


1- CiL 


iri 1-1 


"•.. «:■ 


'. X 






a 


ll 






X ■»■' 


B 


V 


© 


1.1 "V 


-■0 


2 z 


y 




> 


K 03 _l K 03 a 


_i 


K 


K 




> 


K 


« K q: 


- m 


K - 


a K 


« a CC in 


Z ll 


a 


a: <r 


Z N 


.. in n 11 CC 1- 


•113 


in D n 


<r n 


1*^* 


X r.i 




U 














-1 


ii 


y 








* 






!3: 


*y 


y 0. 


^'^ ^ 




y » 1- 




■I 


ii ii ii ii ii : 


a 


il 


il 


a 


II 


il 


■I ii ii 


_i ii 


r ii K ii 


" ii 


CC n 


a 


ll ll 


ii 


11 <x 


ii<ro<r<riiKiiQii« 


H _l CC 


a <r 


Q ii a 


3 ii 


T" 


K 


K K K K K C 


K 


K 


K 


K 


K 


K 


1- K K 


11 K 


XK 


H K 


G K 


1- 1- 


K 


1- K 


K 


K K 


XI-OI-l-l-iII- 


1-1 K •> 


1- ^ 


.1- S 1- 1- 


>- 1- 1- 


K 


a> 


■r 


a ii a ii a 


•I 


•I 


H 


H 


il 


il 


H il 1 


X iI 


U"! H 


3 ii 


ct a 


'X <L <Z 


ii a 


il 


-iiii*.iioaiiii3a(na:x 


S K S- 


-an 


""'SS 


u"l il 


c 


Cl 


Q D Q Q Q i.i- 





Q 


C3 


Q 


Q 


Q 


a Q Q 





y Q 


a 


I G 


a 


G 


G C3 


G 


-JOG 


CC G 


XQ D D 


G 


Z Q £! 


Q y -- 


. Q 


Q 


G 


to 


o 


- IN p:i t 


M! 


'<" 


r-.. 


li-j 


i> 





- <:i V! 


**- 


ifi 


■<' 


K 


» i>. 


Q 


-i (J 


ri 


t \fi 


1:1 


rv m o- 





^ 


M 


c? 


IT 10 


7- "i 


(0 






IM i'( ti iM M 


t ) M 


to 


<:i 


ti 


ri 


r> Ki ri 


rj 


V! 


K< 


r.i 


TO ^-■ 


■I- 


■r -r 


t 


t -r 


T 


1- 1- -r 


U> 


IC< 


ifi 


IP 


10 Vi 


ici 11:1 


u:i 


^ 


■i- 


T 1- t T t 


T 


■i- 


T 


■i- 


■i- 


t 


T t 1- 


t 


T 


■i- 


t 


^- -r 


1- 


■i- -i- 


■r 


■r T 


T 


1- 1- 1- 


1- 


1- 


■^ 


T 


■r t 


T t 


t 



iycr» 



46 



MICRO - The 6502/6809 Journal 



No. 54 - November 198; 




CHRISTMAS SEASON 
SPECIALS! 

Let ARK COMPUTING Make This Your 
Best Christmas Ever! 



Super Fan II by R.H. Electronics 59.95/79.95 

Appljcard, a high performance Z-80 card 

with 64K Ram, complete with CP/M 

4 mhz 324.95/445.00 

6 mhz 395.00/595.00 

Microsoft Z-80 card with CP/M and 

Microsoft Basic 

2 mhz 269.95/395.00 

Microtek Parallel Printer Interface complete 

with centronic compatible connector 

64.95/79.95 

Lazer Lower Case +Plus with Character 

Set +PIUS 49.95/84.90 

Lower Case -l-Plus alone 39.95/59.95 

Lazer Graphics -f-Plus 99.95/1 59.95 

Graphics +Plus and 

Lower Case +Plus 1 34.95/21 9.90 

Computer Stop 16K Ram Board 69.95/149.95 

Computer Stop Omnivision 80 Column board 
129.95/295.00 

Videx Video-term with Softswitch, inverse 

character set and 80 column Visicaic preboot 

295.00/450.00 

Wizard BPO 1 6K buffered printer interface 
(expandable to 32 K) 1 34.95/1 79.95 

Wizard 80, 80 column board 195.00/295.00 

Lazer Pascal 29.9"5/39.95 

Anixl.O 34.95/49.95 

Lazer Forth 44.95/59.95 

D Tack 68000 board for the Apple II 
with 4K Ram 895.00 

Lazer Model/32 (1 6032 board for the Apple II) 
CALL! 



Lisa 

Lisa Educational Pak 

Alien Ambush 

Bandits 

Cannonball Blitz 

County Fair 

Cranston Manor 

Cycled 

David's Midnight Magic 

Dosource 3.3 

Dueling Digits 

Falcons 

Firebird 

Foosball 

Horizon V 

Genetic Drift 

Kabul Spy 

Jelly Fish 

Lemmings 

Labyrinth 

Mouskattack 

Outpost 

Red Alert 

Pig Pen 

Russki Duck 

Minator 

Track Attack 

Thief 

Space Quarks 

Snack Attack 

Swash Buckler 

Gin Rummy 

The Dictionary 

General Manager 

4 Ft, Disk Cable 

Visicaic 

Using 6502 Assembly 

Language Book 

Kids and The Apple 

Computer Book 

Apple Panic 

Kraft Joystick 



59.95/79.95 
79.95/119.95 
19.95/29.95 
19.95/29.95 
24,95/34.95 
19.95/29.95 
24.95/34.95 
19.95/29.95 
24.95/34.95 
24.95/39.95 
19.95/29.95 
21 .95/29.95 
21 .95/29.95 
19.95/29.95 
25.95/34.95 
19.95/29.95 
24,95/34.95 
19.95/29.95 
19.95/29.95 
19.95/29.95 
24.95/34.95 
19.95/29.95 
19.95/29.95 
24.95/34.95 
25.95/34.95 
24.95/34.95 
19.95/29.95 
17.95/29.95 
19.95/29.95 
19.95/29.95 
24.95/34.95 
24,95/34.95 
69.95/99.95 
99.95/149.95 
19.95/29.95 
179.95/250.00 

14.95/19.95 

15,95/19.95 
19.95/29.95 
49,95/69.95 




Your Salvation 

In The Sea Of 

Inflation. 



714735-2250 

P.O. Box 2025 
Corona, CA91720 




No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



47 



ROCKWELL Microcomputers from Excert, Inc. 



THE AIM 65/40 
Single Board or Smorgasbord 




A full size terminal style keyboard w/8 special 

function keys 

A smart, 40 character display with its own 

microprocessor 

A 40 column printer w/text and graphiic output 

Up to 64K of on-board RAM and ROM 
On-board interfaces include RS232, dual audio 
cassette and 2 user I/O R6522 devices 

Firmware includes interactive monitor and text 
editor w/options of Assembler, BASIC, FORTH 
and PL/65 



THE AIM 65 
Take-Out Order 




A full size terminal style keyboard w/3 special 

function keys 

A 20 character display 

A 20 column printer w/text and graphic output 

capability 

Up to 4K RAM and 20K ROM on-board 

On-board interfaces include 20MA TTY, dual 

audio cassette and 1 user I/O R6522 device 

Firmware includes interactive monitor and text 
editor w/options of Assembler, BASIC, FORTH, 
PASCAL, & PL/65 



And if the above isn't enough, 
Try the RM65 — a product line filled with embellishments including: 



32K DRAM Board 
CRT Controller 
Floppy Disk Controller 
PROM Programmer 



ACIA Board 
IEEE-488Board 
CPU/SBC Board 
4-16 Slot Card Cages 



Prototype cards 
Adaptor Buffer Modules 
General Purpose I/O Board 
PROM/ROM Board 



NEW LOWER PRICES AND A CASH DISCOUNT* TO BOOT! 



A65/40-16(16KRAM) $1225 

A65/40-32 (32K RAM) $1 295 

A65/40-A (Assembler) $ 85 

A65/40-B (BASIC) $ 65 



Mail Order to: 



A65-1 (1 K RAM) $420 

A65-4 (4K RAM) $445 

A65-4B (4K RAM w/BASIC) $495 

A65-PS (PASCAL) $100 

A65-F (FORTH) $ 65 

A65-A (Assembler) $ 35 



Educational Computer Division 
EXCEPT INCORPORATED 



SALES 
SERVICE 
INSTALLATION 
CONSULTING 



P.O Box 8600 

White Bear Lake, MN 55110 

(612)426-4114 



Higher quantities quoted upon request, COD's accepted, 
shipping will be added. * Deduct 5% cash discount on 
prepaid orders. Minnesota residents add 5% sales tax. 
Prices subject to change without notice. 



48 



MICRO - The 6502/6809 Journal 



No. 54 - November 1962 



GAMES FEATURE 



SYM 23 Matches 



by MattGanis 



Two players alternate, removing 
matches from a pile of 23; the 
player taking the last match 
loses. On each turn a player may 
take 1, 2, or 3 matches. 

23 Matches 

requires: 

1KSYM 

In this version of the game the human 
challenges the computer. Key in G 
0200 to begin the game. The LEDs will 
go blank and the SYM will wait for you 
to press any key on the keypad. Once 
this is done the computer informs the 
player that it is his turn. At this point 
the player enters either a 1, 2, or 3 (tak- 
ing away 1, 2, or 3 matches]. The SYM 
will inform the player of the number of 
matches it is taking by scrolling the 
message 'I SELECT....' 

Modifications to the program are 
very simple: 

1 . To change the speed of the messages 
that scroll on the display, decrement 
the value at location $02FA. 

2. To make the computer move first, 
change the at location $0204 to 1 . 

3. To alter the number of matches used, 
change the $17 (hex $17, decimal 23) 
to the number of matches desired. 

The only part of the program that 
might be used in another program is the 
'display-a-message' routine at location 
$02EE. This routine will scroll a 
message across the SYM displays start- 
ing at the right-most display and ending 
at any desired display. Just set the zero 
page pointer (PTR| to the location of 
the message [lo, hi), and load the Y 
register with the number of displays to 
be used minus one. Then do a JSR 
MESSAGE. 



Mr. Ganis studies computer science at 
PACE University (Pleasantville/ 
Briarcliff). He may be contacted at 
Sheridan Road R.D. #3, Lebanon, NJ 
08833. 



23 Matches 



33 •■ 



020£i 



THIS Is R GliME OF 23 NRTCHES. 
EhCH person (THE COMPUTER RMIi 
THE PLfiVER ThKE TURNS TRKING 
RWRV MATCHES FROM THE PILE. 

ON ERCH TURN VOU MhV TRKE ONLV 
1..2 OR 3 NRTCHES. THE PLRVER 
TRKING THE LRST MATCH LOSES ! ! 

EHSIC VERSION FROM - 

lei BhSIC COMPUTER GAMES 
EDITED EV DAVID H. RHL 



TO START GRME KEV 



G e2e0 



.***iERO PAGE LOCRTIGNS USED 



30: 


0200 


MOVE 


= 


*00 


WHOSE MOVE IT IS 


Si: 


0200 


MATCHES 


= 


*01 


NUMBER OF MATCHES 


32: 


0200 


DISPLAV 


= 


*02 


LAST DISPLAV USED 


S3: 


020Q 


RND 


= 


*04 


RANDOM NUMBER 


34: 


0200 


PTR 


= 


$0Z 


POINTER FOR MESSAGES 


35: 


0200 


COUNT 1 


= 


$0? 


DELAV COUNTER 1 


36: 


0200 


C0UNT2 


= 


$08 


DELAV COUNTER 2 


37: 


0200 


TEMP 


= 


*09 


TEMP. STORAGE 


ss- 


0200 


REG 


= 


*0A 


1ST REG. COMPUTER MOVE 


39: 


0200 


SVMMOVE 


= 


*0B 


COMPUTER'S MOVE 


90- 


0200 


REG2 


= 


*0C 


2ND REG. COMPUTER MOVE 


91: 


0200 


TEMP2 


~ 


$0D 


TEMP. STORAGE 2 






':*.**MONITOR 


LOCATIONS US 


ED**.* 



GETKEV 



■fSSAF 



,;GET A KEV FROM KEVPAD 



94 


0200 






LED 


= 


:tA640 


.: LOCATION OF 1ST D I SPLAY 


95 


0200 






SCAND 


= 


1-3906 


.;SCAN THE DISPLAV 


■:->€■ 


02013 






ACCESS 


= 


*SBS6 


.; ENABLE SVSTEN RAM 


97 


0200 






SEGCODES 


= 


*8C29 


.: TABLE OF SEGMENT COEES 


98 


0200 






KEVSTAT 


- 


*396A 


.;IF A KEV IS DONN C=l 


10t 


3 : 0200 






■■ 


*= 


i:0200 




Ilk 


1 : 0200 


20 


36 3B 


MAIN 


JSR 


ACCESS 


.: ENABLE RAM 


121 


0203 


A9 


00 




LDA 


#0 




121 


0205 


85 


00 




STA 


MOVE 


,:PLAVER FIRST 


13t 


0207 


A9 


17 




LDA 


#23 




i-se 


0209 


85 


01 




STA 


MATCHES 


.: MATCHES=23 


14k 


020E 


A9 


42 




LDA 


#i:42 




14t 


020D 


35 


02 




STA 


DISPLAV 




14£ 


020F 


A9 


A6 




LDA 


#*A6 




14f 


0211 


35 


0.3 




STA 


DISPLAV+1 




156 


0213 


E6 


04 


RANDOM 


INC 


RND 


.; GENERATE RANDOM # 


ise 


0215 


20 


6fl 39 




JSR 


KEVSTAT 


..WAIT FOR KEV DOWN 


16; 


0213 


90 


F9 


; 


BCC 


RANDOM 


.:IF NO KEV ..BUMP RND 

(continued) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



49 



GAMES FEATURE! 



/MCftO 

New Publications 

40 Computei Games horn Kilobaud 
Microcomputing, edited by Emily A. 
Gibbs and Jim Perry. Wayne Green, 
Inc. (Peterborough, NH), 1980, 148 
pages, paperback. $7.95 



40 Computer Games offers you some of 
the best game programs from recent 
issues of Kilobaud Miciocomptuing. 
Nine game categories offer something 
for everyone. Accompanying articles 
explain how to play the games and in- 
crease the odds to beat the computer. 
The games are written in different lan- 
guages for various computer systems. 

CONTENTS: Gambling; Racing; Space; 
Board Games; Card Games; Guessing 
Games; Puzzles; Calculators; Odds and Ends. 

Science and Engineering Sourcebook by 

Cass Lew art. Micro Text Publications 
Inc. (One Lincoln Plaza, Suite 27C, 
New York, NY 10023), 1982, 95 pages, 
6x9 inches, paperback. 
ISBN: 0-942412-02-8 $9.95 

A book of professional applications pro- 
grams for the TRS-80 Pocket Com- 
puter. The programs cover problems in 
the field of electrical engineering, 
statistics, queuing theory, reliability, 
graph generation, artificial intelli- 
gence, and related technical disci- 
plines. A table of conversions make the. 
translation of these programs applic- 
able to other BASIC computers. 

CONTENTS: Foreword; Introduction; Elec- 
trical Engineering; Data Transmission; 
Number Theory; Computer Programming; 
Computer Generated Plotting; Probability 
and Statistics; Mathematics; Operations 
Research; Miscellaneous; Appendix. 

Games for the ATARI, by S. Roberts. 
Elcomp Publishing, Inc. (53 Redrock 
Lane, Pomona, CA 91766), 1982, 115 
pages, paperback. 
ISBN: 3-911682-84-3 $7.95 

Games for the Ataii provides ideas on 
how to create your own computer 
games. This booklet deals primarily 
with BASIC examples with only one 
example in machine language. Atari 
programs show the possibilities of 
using both graphics and sound features. 

CONTENTS: Drawing Figures on the 
Screen; Movements in BASIC; Movements 
in Machine Language; Movements of 
Missiles; Overlapping Detection; Sound- 
fContinued on next page) 



23 Matches (continued) 



166 


021fl 1=19 00 


PRINT 


LDR 


#0 


; PRINT MRTCHES 


167 


02 IC 85 09 




STR 


TEMP 




IbS 


021E fi5 01 




LDR 


MATCHES 




170 


0220 38 


PNT2 


SEC 




; DETERMINE TENS 


172 


0221 E9 0R 




SBC 


#*0R 


;BV SUCCESSIVE 


174 


0223 30 04 




BMI 


PNT3 


.■SUBTRACTIONS OF 10 


176 


0225 E6 09 




INC 


TEMP 


.BUMP TENS SPOT 


178 


0227 D0 F7 




BNE 


PNT2 


.iBRRNCH RLWRVS 


180 


0229 18 


PNT3 


CLC 






182 


022fi £9 01=1 




RDC 


#*0R 


.:flDD 10 BRCK 


184 


022C flfl 




TRX 




.:T0 GET UNITS 


186 


022D ED 29 8C 




LDR 


SEGCODES.,X 


.:GET SEGMENT CODE 


188 


0230 3D 41 R6 




STR 


LED+1 


;2ND DISPLflV 


190 


0233 fl6 09 




LDX 


TEMP 


.;GET TENS 


192 


0235 BD 29 8C 




LDR 


SEGCODES.X 


.: GET THE CODE 


194 


0233 8D 40 H6 




STR 


LED 


.:1ST DISPRLV 


196 


023E fl5 01 




LDR 


MRTCHES 


;TEST FOR ZERO 


198 


023D D0 03 




BNE 


OVER 


.: MRTCHES, BRANCH IF K 


200 


023F 4C D0 02 




JMP 


LOST 


.: SOMEONE LOST ! ! 


202 


0242 Fi9 01 


OVER 


LDR 


#1 


.; DETERMINE WHOSE 


204- 


0244 38 




SEC 




;move it IS BV 


206 


0245 E5 00 




SBC 


MOVE 


.; COMPUTING M0VE=1-M0V 


208: 


0247 85 00 




STR 


MOVE 




210: 


0249 F0 27 




BEO 


COMPUTER 


.;IF COMPUTER -S MOVE 


212: 


024B fi9 IE 




LDR 


#<:plvrmove 


; PRINT THE 


214: 


024D 85 05 




STR 


PTR 


.: -VOUR MOVE-- 


216: 


024F fl9 03 




LDR 


#>PLVRMOVE 


MESSRGE 


218: 


0251 85 06 




STR 


PTR+1 




220: 


0253 20 EE 02 




JSR 


MESSRGE 


;displav it 


222: 


0256 20 RF 88 


GET 


J3R 


GETHXV 


;WflIT FOR PLflVERS 


224: 


0259 C9 34 




CMP 


#*34 


; MOVE 


226: 


025B B0 F9 




ECS 


GET 


JBRRNCH if KEV>-4-' 


228: 


025D C9 31 




CMP 


#*31 




230: 


025F 90 F5 




BCC 


GET 


.iBRRNCH IF KEVC-l-' 


232: 


0261 38 




SEC 




.: CONVERT FROM R3CII 


234: 


0262 E9 30 




SBC 


#$30 


.:T0 INTEGER 


236: 


0264 85 09 




STR 


TEMP 


;KEEP IN TEMP 


238: 


0266 ft5 01 




LDR 


MRTCHES 


.:MRKE SURE PLRVER 


240 ■ 


026:3 :j:5 




-■Ef 




.iill:r-i T TRk£ rORE 


242 


0269 E5 09 




SBL 


yEMP 


-fHRN WriRT -'3 !•■) hlLh 


244: 


SilfcE :30 E9 




EH I 


GET 


jLRhriCH I- 30 


246 


026D 35 01 




STfi 


ClRTCHES 


.fcL3t :3ruR£ RtSiJLr 


24:5 : 


026F 4C IH 02 




jfip 


PRINT 


.. fil-tV C null HUE. 






: ***]- 


JflPUTER 


■S MOVE*** 




25m: 


0272 h5 01 


CUMPUT 


ER LBfi 


fiRTCHES 


; IF MRTCHES=1 


^5ii! ■ 


0274 Cy 01 




cnp 


itl 


.COMPUTER Ln:3T 


254: 


0276 110 03 




BNE 


CP10VE 




25b- 


0278 4C FiD 02 




J.f'iP 


FIHTSH 


; JUMP I'JJTH RCC=1 


253: 


02 7B 4Fl 


CMO'v'E 


l8R 




..COMPUTE - 


260: 


027C: 4H 




l8R 




.;R=4*INT(NRTCHES.-'4;i 


262- 


027D 0Fl 




.RSL 






264: 


027E 0H 




R:3L 






266 : 


027F 85 0Fl 




SIR 


REG 


..KEEP ir IH REG 


26:3 : 


02S1 38 




SEC 




..COMPUTE - 


270: 


0232 fi5 01 




LBR 


MR rCHES 


.;R=MRTCHES-REG 


'■•y'j : 


0234 E5 0H 




S£C 


REG 




274: 


0286 85 0,R 




STR 


REG 


.;KEEP IT IH REG 


276 : 


0283 C9 01 




CHP 


#1 


vlF REG=1 THEH 


278 : 


023fl m 13 




BNE 


CMUVE3 


.;MRKE RfiNDOM MOVE 






.; ***RRNriOM NUMBER GENERRTuR*.**.; 


2S0 : 


02SC ns 


CM0VE2 


CLD 




,;EIHRRV RDDITION 


282 : 


023D R5 04 




LDR 


RND 


.;GET RHD 


284 : 


023F 0H 




RSL 




.: COMPUTE - 


296 


0290 0H 




RSL 




,; RND=4*RND 


2S3- 


0291 13 




CLC 






290 


0292 65 04 




RDC 


RND 


.: RHD=5*RND 


291: 


0294 13 




CLC 






291 


0295 €3 01 




RDC 


#1 


.;RND=5*RHD+1 


292 


0297 85 04 




STR 


RND 




294: 


0299 29 03 




HUD 


r-:ee0000ii 


.:MhKE sure 1<RHD<3 


296 


029B F0 EF 




BEG 


CMUVE2 


.:NU ZERO-'S RLLOWED 


293: 


029D D0 12 




BNE 


DONE 


.; BRRMCH RLWRVS 


300 


029F 13 


CMOVE:.- 


CLC 






302 


02R0 flS 0R 




LDR 


REG 


.iCOMPLTE - 


304 ■ 


02H2 69 03 




RDC 


#3 


.:REG2=REG+3 


306 : 


02H4 35 0C 




STR 


REG2 




30:3 


02fi6 4H 




LSR 




.: COMPUTE - 


310 


02FI7 4ft 




LSR 




.; 4*IHT(REG2/4) 


312 


02fl3 0fl 




RSL 






314- 


02fl9 0fl 




RSL 






316: 


02Flfl 85 0D 




SIR 


TEMP2 


.:hND KEEP IN TEMP2 


31 S: 


02FIC; 38 




SEC 




.: DETERMINE MOVE BV 



50 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



GAMES FEATURE 



23 Matches (continued) 



320 : 


02RD R5 vjC 




FIHISH 


LDR 


REG2 


; COMPUTING - 




02flF E5 011 






SEC 


TEHP2 


.. REG2-TEMP2 


324 : 


02B1 85 0E 




DONE 


STfl 


SVMMOVE 


jTHIS IS COMPUTER'S MOVE 


326 : 


02E3 33 






SEC 






323 • 


02E4 fl5 01 






Llifl 


MRTCHES 


;TflKE flWflV FROM PILE 


330 : 


02B6 E5 0E 






SEC 


SVMMGVE 




332 ; 


02ES 35 01 






STR 


MflTCHES 


;PUT RESULT EflCK 


334: 


02Efl fi6 0E 






LDX 


SVMMGVE 


..GET SEGMENT CODE 


336 ; 


02EC Ell £9 


3C 




LDR 


SEGCODES.K 


.:0F COMPUTER'S MOVE 


333: 


02BF SD 51 


03 




STR 


COMPEVTE+1 


.; STORE IN MESSflGE 


340 ■ 


02C2 fi9 44 






LDfl 


#<;COMPMOVE 


ipRINT THE 


342: 


02C4 85 05 






STfl 


PTR 


;'I SELECT X' 


344 ■■ 


02C6 f=l9 03 






LDfl 


#>COMPMOVE 


.: MESSflGE 


346 ■ 


02C8 85 06 






STfl 


PTR+1 




34S- 


02Cfl 20 EE 


02 




JSR 


MESSAGE 


..DISPLflV IT 


350 : 


02Cri 4C Ifl 


02 




JMP 


PRINT 


.; CONTINUE 


352: 


02D0 fl5 00 




LOST 


Llifl 


MOVE 


.; SOMEONE LOST 


354 : 


02D2 C9 01 






CMP 


#1 


;WHO IS IT PRINT 


356 : 


02114 F0 0H 






EEQ 


PLflVER 


;IF M0VE=1 THEN PLflVER 


358: 


02D6 fl9 57 






LDfl 


»<COMPLOSE 


; PRINT THE 


360: 


02D8 35 05 






STfl 


PTR 


.; ' I LOSE . . ' 


362: 


02DH Fl9 03 






Llifl 


»>COMPLOSE 


.; MESSflGE 


364: 


02111:: 85 06 






STR 


PTR+1 




'Jb6 : 


02DE D0 08 






BHE 


DISMES 


.: ERRHCH flLWflVS ! 


368: 


02Ee h9 21! 




PLRVER 


LDfl 


»<:plvrlose 


.: PRINT THE 


370: 


02E2 S5 05 






STfl 


PTR 


.:'VOU LOSE ..' 


372 : 


02E4 fl9 03 






LDR 


#>PLVRLOSE 


.: MESSAGE 


374 : 


02E6 35 06 






STfl 


PTR+1 




376: 


02ES 20 EE 


02 


DISMES 


JSR 


MESSAGE 


.iDISPLAV IT 


378: 


02EE 41; 00 


02 




.JMP 


MfllH 


.; START ALL OVER 








}*if*DIS 


PLRV R MESSflGE*if.* 




:";S0 : 


02EE fl0 03 




HESSRGE 


LDV 


#3 


.iNUMEER OF DISPLAVS-1 


382: 


02F0 El 05 




MESSl 


LDfl 


■;ptr:v.v 


:GET fl EVTE 


334 : 


02F2 30 20 






EMI 


EVE 


ilF NEG.. STOP 


336 : 


02F4 91 02 






STfl 


(:DISPLflV.\.V 


.: DISPLAV IT 


:383: 


02F6 38 






DEV 






390 : 


02F7 10 F7 






EPL 


MESSl 


.:KEEP GOING 


■-■,Q-7 : 


02F9 R9 02 




DELflV 


LDfl 


#2 


.iDELAV A LITLE EIT 


394 


02FE 85 07 






STfl 


COUNT 1 




396 : 


02FD fi9 FF 




Dl 


LDfl 


#*FF 




398 : 


e2FF 85 08 






STR 


C0UNT2 




400 : 


0301 20 06 


39 


D2 


JSR 


SCflHD 


.iSCAN THE DISPLAV 


402 


0304 C6 08 






DEC 


C0UNT2 




404: 


0306 110 F9 






EHE 


D2 




406 : 


0308 C6 07 






DEC 


COUNT 1 




408: 


030fl D0 Fl 






EHE 


Dl 




410: 


030C E6 05 






IHC 


PTR 


.:EUMP PTR 


412: 


030E D0 02 






EHE 


D3 




414: 


0310 E6 06 






IHC 


PTR+1 


.; DOUELE EUMP 


416: 


0312 D0 Efi 




113 


EHE 


NESSflGE 


.. ERAHCH ALWAVS 


413: 


0314 60 




EVE 


RTS 






413: 


03 IE 




■ 


*= 


fSlB 




450: 


03 IE 00 00 


00 


PLVRHOVE 


. EVTE 


:|:00..:$:00..f00 


.;DflTA FOR THE 


452: 


03 IE 00 6E 


5C 




. EVTE 


tm..-tf.E..t-5C 


i'VOUR MOVE' 


454: 


0321 IC 50 


00 




. EVTE 


flC..l--50..f00 


.; MESSflGE 


456: 


0324 73 IC 


50 




. EVTE 


*73..*1C..*50 




458 : 


0327 54 00 


80 




. EVTE 


f54,*00,*00 




460 : 


032R 00 00 


80 




. EVTE 


*00.*00..*30 




470: 


032II 00 00 


00 


PLVRLOSE 


. EVTE 


*00.*00..*00 


:DflTfl FOR THE 


472: 


0330 00 6E 


5C 




. EVTE 


*00.*6E..*5C 


.;'VOU LOSE..' 


474: 


0333 IC 00 


38 




. EVTE 


*1C..*00..*38 


.: MESSflGE 


476: 


0336 3F 6D 


79 




. EVTE 


*3F..*6D..*79 




478: 


0339 00 76 


77 




. EVTE 


$00.. 1:76.. f 77 




480 : 


033C 00 76 


77 




. EVTE 


*00..*76..*77 




482: 


033F 00 00 


00 




.EVTE 


*00..i--00..100 




484: 


0342 00 80 






. EVTE 


*00..*30 




430: 


0344 00 00 


00 


COMPMOVE 


. EVTE 


*00.1--00.*00 


.:DflTA FOR THE 


492: 


0347 00 06 


00 




. EVTE 


*00.*06..*00 


.'I SELECT K' 


494: 


034R 611 79 


38 




. EVTE 


*6D.l--79..*38 


..■ MESSAGE 


496: 


034D 79 39 


78 




. EVTE 


*79.1--39,..*7S 




498: 


0350 00 FF 


00 


CGHPEVTE 


. EVTE 


$m,tFF..$e£i 




500: 


0353 00 00 


00 




. EVTE 


*00.*00..*00 




502: 


0356 80 






. EVTE 


*80 




520 : 


0357 00 00 


00 


COMPLOSE 


. EVTE 


*00.*00..*00 


.iDATfl FOR THE 


522: 


035fl 00 06 


00 




. EVTE 


f00..*06..100 


;'I LOSE..' 


524: 


035II 38 3F 


611 




. EVTE 


*3S.*3F..*6D 


.: MESSAGE 


526: 


0360 79 00 


7C 




. EVTE 


*79..*00..*7C 




528 : 


0363 5C 5C 


00 




. EVTE 


*5C.*5C..*00 




530 : 


0366 78 06 


6D 




. EVTE 


*73..*06.*6D 




532: 


0369 ev 00 


00 




. EVTE 


*6D..*00..|:00 


iiMCftO 


534: 


036C 00 00 


80 




.EVTE 


*00..*00..*S0 



New Publications 



(contiimed) 



features; Programming the Joystick; 
Backgammon; SMARTY; BOMBER; 
ROBOT ATTACK; BALL; SMART; BAR- 
RIER; KNIGHT-BATTLE; CALENDAR; 
GUNFIGHT; Appendix; The Video Pro- 
cessor "ANTIC" and the Atari 400/800; 
Display List Interrupts and the Atari, Atari 
400/800 and CTLA/GTIA; The Atari 
400/800 and its Character Set. 

Apple n Assembly Language, by Mar- 
vin L. De Jong. Howard W. Sams & 
Co., Inc. (4300 West 62nd St., In- 
dianapolis, IN 46268), 1982, 334 pages, 
5W X 8V4 inches, paperback. 
ISBN: 0-672-21894-1 $15.95 

This is a 6502 assembly-language man- 
ual written for the beginning assembly- 
language programmer on the Apple II. 
Dr. De Jong introduces each topic in a 
building-block concept, starting with a 
description of a microcomputer and 
continuing through interrupt program- 
ming and real-time applications. The 
book is carefully written and well il- 
lustrated with programming examples. 
The only possible flaw with the book is 
that it quickly gets technical after the 
first half dozen chapters. If the reader 
were truly a beginner, he would find 
the material difficult. 

CONTENTS: The Microcomputer System; 
Writing and Executing Simple Assembly- 
Language Programs; Branches and Loops; 
Logical Operations and Shift and Rotate 
Operations; Arithmetic Operations; Ad- 
dressing Modes: Indexed Addressing; Sub- 
routines, The Stack and Interrupts; Addi- 
tional Programming Topics; Programming 
with the 6522; Applications; Decimal, 
Binary, and Hexadecimal Number Systems; 
Additional Circuits and Programs; Pin Dia- 
grams of Some Integrated Circuits; Index. 

Phil Daley 
MICRO Staff 

Kids and the Apple, by Edward H. 

Carlson. Reston Publishing Company, 

Inc. (Reston, VA), 1982, 218 pages, 

paperback. 

ISBN: 0-8359-3669-4 $19.95 

This book teaches Applesoft BASIC on 
both disk-based or cassette Apple 
systems to children from 10-14 years 
old. The book is intended for self- 
study, but may also be used in a 
classroom setting. The lessons contain 
explanations, examples, exercises, and 
review questions. Notes for the instruc- 
tor summarize the lesson material, pro- 
vide helpful hints, and give good 
review questions. 

CONTENTS: Introduction; Graphics, 
Games, and All That; Advanced 
Programming. JVICftO" 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



51 



chances are, when you 
bought your first disk drive, it 
was an Apple. Now that you're 
ready for a second, take a look 
at Quentin. 

Our Apple*-i\4ate™ S^A" Disk 
Drive is fully software transparent 
with Apple's DOS 3.3 operating 
system in full and half track 
operation. 

Add it to your present drive for 
greater capacity and faster access. 
Just plug it in and go to work. 

And the Apple- Mate has these 
High Performance advantages: 

ON TRACK HEAD SEEK 

A precision lead screw positions 
the head onto the correct track. 
Time-consuming retries and 
disk-to-disk copying errors are 
virtually eliminated. 

SIEMENSt DISK DRIVE 

The apple-beige unit is built 
around the highly reliable 



Siemens system with over 
10,000 lifetime hours. Shielded 
connecting cable also attached. 

LONG TERM 
DEPENDABILITY 

MTBF (Mean Time Between 
Failures)— 8,500 power-on hours, 
and the unit has a one-year 
warranty 

COUNT ON QUENTIN 
FOR QUALITY 

Quentin Research was building 
disk systems for the computer 
industry when Apple was a little 
bud on the big computer tree. 
We're known for product reliabil- 
ity and stand behind every system 
we sell you. 

But the best news may be the 
price— only $335.00 (40 tracks). 



A special introductory offer 
when you order Apple-Mate 
directly from us. 

So when you're ready to boost 
the juice on your Apple, add-on 
the Quentin Apple- Mate. 

To order: Check, money order. 
Visa or Mastercard number Calif, 
residents add 6% sales tax. 
Allow one week delivery. 



fQucniin' 



RESEARCH, INC.^ 

19355 Business Center Drive 
Northndge, California 91324 
(213)701-1006 






MORE JUIC 
FOR YOUR 
APPLE 



Special 
Introductory 
Price: 
$335.00 



® Apple is a registered trademark of Apple Computer, Inc. 
tSiemens is a trademark of Siemens Corporation. 
*Appte-Mate is a trademark of Quentin Research, Inc., 
which does not manufacture Apple computers. 



GAMES FEATURE 



Solve the Pagoda Puzzle 
Using Recursive Assembly 



by Sherwood Hoyt 



This routine solves the 
"Pagoda" or "Tower of Hanoi" 
puzzle, using a recursive 
subroutine — one that calls 
itself. Four stacl(s are 
maintained for passing 
parameters. 



Pagoda Solver 

requires: 

6502 computer with 2K 
(uses 13 page-zero iocations, 
and cliaracter OUTPUT and 
iNPUT routines — provided for 
PET, Appie, and OSI OS-65D). 



The Pagoda Puzzle is a game using a 
rectangular platform with three pegs 
sticking vertically out of it. The peg 
sticking out of the left side of the board 
has a number (usually eight) of discs 
stacked on it. The discs get smaller as 
you near the top of the stack [see figure 
1). The object is to move the discs, 
which could be called a tower, from the 
peg on the left of the board to the peg on 
the right. There are only two rules to 
the game; move only one disc at a time, 
and never put a disc on top of another 
one so that the larger one is on top. 

According to Peter Grogono's book 
PTOgTomming in Pascal [where I first 
read about this game and the algorithm 
to solve it), the game was accompanied 
with literatvuie saying that priests in 
the Temple of Bramah played the 
game. When they finished their game, 
it signified the end of the world. Ap- 
parently the priests were playing with 
64 discs. It would take roughly 18.4 
billion billion moves to solve a 64-disc 
game. According to Peter Grogono, and 
some rough calculations that I made, it 
would take a powerful computer about 
a million years (if it could run that 
long] just to compute, not to mention 
print, the moves for a 64-disc game. It 
would take my OSI computer about 60 
million years. 



One function that can be used to 
calculate the number of moves for n 
discs is ( (2An)-l). A 4-disc game 
would take 15 moves; eight discs, 255. 
The number of moves the game takes 
as the number of discs goes up is 
exponential. 

Recuision and the Towei 

The recursive procedvuie to move 
the tower is quite simple; see listing 1 . 
Let's assume that the pegs are num- 
bered from one to three. The tower is 
stacked on peg 1, and is supposed to be 
moved to peg 3. The procedvuie is called 
initially with four parameters. 
NMDISC is the number of discs on the 
tower, FROM is set to peg 1, TO is set 
to peg 3, and USING is set to peg 2. 



and USING receives the value of TO. 
The same thing is done in the third 
statement with FROM and USING. 
The second statement prints a move; a 
disc is taken off peg FROM and put on- 
to peg TO. The algorithm in this pro- 
cedure is used in the assembly- 
language program to solve the puzzle. 
The trick to a recursive procedure is 
in maintaining distinct values for the 
local variables of the procedure, so that 
when the procedure calls itself the 
variables have separate values, though 
the names of the variables may be the 
same. To accomplish this, the variable 
values can be put on a stack [a block of 
memory pointed to by a stack pointer] 
in much the same way that return ad- 
dresses for a JSR are put on the 6502 
stack. In a procedure, this is done to be 



Figure 1 



I 

I 

I 

DDO 

DDDDD 

DDDODDD 

DDDOODDOD 

DODDODODDDD 

DDDODDDOOODDO 

DDDDDDDDDDDDDDD 

DDDODODODDDODDDDD 



THE F>AC3aDA F*LJZZI_E 



The first operation of the procedvuie 
is to check the number of discs left on 
the tower. If the number is not greater 
than zero, control returns to the calling 
procedure. If the condition is true 
(NMDISOO), then the three state- 
ments between the IF...ENDIF are ex- 
ecuted. The first statement is a recur- 
sive call. You can see that the number 
of discs passed is equal to the current 
number of discs minus 1, and para- 
meters TO and USING are passed so 
that TO receives the value of USING 



able to pull the values out of the "deep 
freeze" when control returns to the 
procedure. When a procedure is called, 
and there may be indefinitely many 
nested calls, its values are pushed on 
top of the stack. For the program to 
remember where the top of the stack is, 
a pointer is used that always points to 
the top. In my assembly-language pro- 
gram, the pointer is register Y, and it is 
incremented before a value is pushed to 
the stack, and decremented to pop a 
value off of the stack. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



53 



SERIOUS CBM® USERS 
NEW FROM KILO 

"The Serious Solution" 

6809 + MICROWARE OS-9* + BASIC09* 



Tired of the frustrating limitations of Commodore Basic? Need to get a 
serious programming language for your Commodore computer? KILO of- 
fers The Serious Solution. A 6809 plug in adaptor board including OS-9 
Level I Operating System in ROM, BasicOQ* and 16K RAM expansion. 
The KILO 6809 adaptor board simply plugs in to your Commodore com- 
puter. The switching between 6502 and 6809 is under software control. 
Expansion RAM can be used to replace protection ROMs with 6502. 

With The Serious Solution, all Microware software can now be run on 
your computer. The standard package comes with the Basic09 Struc- 
tured Basic Interactive Compiler. The fastest and most comprehensive 
full Basic language available for the 6809. This combines standard 
Basic with the best features oi PASCAL. It features compiler speed, 
interpreter friendliness and superlative debugging facilities. Option 
available includes Run B...a ROMable run-time system for compiled 
Basic-09. 

Please note: The OS-9 distribution disk format is not compatible with 
the Commodore disk format. OS-9 software purchased from sources 
other than KILO may need to be reformatted. KILO will provide this 
service at $10.00 per disk. Software venders should contact KILO 
for SS-50 to Commodore adaptor hardware and software. 

SPECIAL: Buy The Serious Solution before Christmas and 
get Editor/Assem./Debug package for $200. 



The Serious Solution $489 

including 6809 adaptor board, 
OS-9 Level I operating system 
in ROM, BasicOQ and 16K RAM 
expansion. 

Microware* Software Options 

PASCAL compiler $400 

C Compiler $400 

CIS COBOL Compiler $895 

Editor/Assem./Debug package $300 



VISA and Mastercard welcome. Don't forget last month 





CBM and Commodore are registered trademarks of Commodore Computer, OS-9 and Basic09 are registered 
trademarks of Microware and Motorola. CIS COBOL is a trademark of Micro Focus, Inc. 

KILO CORPORATION • P.O. Box 7530 • Ann Arbor, Ml 48107 • 313 668-1566 



54 



MICRO - The 6502/6809 Journal 



No. 54 - November 19£ 



GAMES FEATURE! 



Listing 1: Recursive Procedure In 
Pseudo-Code 

PROCEDURE MOVE RECEIVE 
[NMDISC,FROM,TO,USING) 

IF NMDISC > THEN 

CALL MOVE WITH(NMDISC - I, 
FROM,USING,TO) 

PRINT FROM," -* ",TO 

CALL MOVE WITH(NMDISC - 1, 
USING,TO,FROM) 

ENDIF 

END PROCEDURE 



The Recursive Assembly-Language 
Program 

In the assembly-language program 
(listing 2), there are four zero-page loca- 
tions (lines 130-160) for passing values 
to the recursive procedure labeled 
MOVE [lines 530-820). Values are 
passed from recursive procedural calls 
via these locations, as well as initially 
from the calling routine. The calling 
routine (lines 470-490) jumps to lines 
1590-2360 to initialize the parameters 
and stack pointers. Register Y is used as 
the stack index, and is initialized to 
$FF. When MOVE is called, register Y 
is incremented before the values passed 
are actually pushed on the stack, so 
that the procedure, when first called, 
will increment register Y to $00, then 
push the values on the stack indexed by 
register Y. 

The stack pointers are initialized 
next. There are four stacks, one stack 
for each value that is passed. When the 
procedure is called, register Y is incre- 
mented so that it points to a new stack 
position. The total number of bytes 
used in each stack for any given game is 
equal to the number of discs on the 
tower. Each stack occupies one page 
($00-$FF) of memory. Actually, the 
stack size only needs to be one half of a 
page because the number of JSRs that 
can be executed, and therefore the 
number of recursive calls and separate 
values, is limited by the 6502's one- 
page stack, which can only hold $80 
two-byte return addresses. The largest 
tower that this program can move has 
approximately $70 discs on it, which 
allows part of the stack to have been used 
already by the calling routine. However, 
having a maximum game of $70 discs is 
obviously no problem if it would take a 
computer a million years just to solve a 
$40 (decimal 64) disc game! 

After the initialization routine 
stores zero in the location that holds 



nm 


Listing 


2 




0010 


;««•«««««««»««*•*•«•««««««••««• 












0020 


:« 


















0030 


.!* 


PRGODH 


SOLVER 














0040 


!* 


















0050 


;* 


by Sherwood Hoyt 














0060 


!* 


















0070 


7««««««««««»««*******«*«*«***«« 












0080 


; 


















0090 


; P»reme-t.ers passed 














0100 


! 


















0110 




■ ba 


»54 




)PET 










0120 


J0S-65D 


—*10> Hpple— »-f0 














0130 


nmd i sc 


.de 


= 














0140 


■from 


.de 


nmdisc-»-l 














0150 


■to 


.de 


^rotn+1 














0160 


uslncf 


.de 


to^H 














0170 


; 


















0180 


) s^t 


ack r>-tr' 


E to local ya 


lues 













0190 


; 


















0200 


rif&tr 


.de 


usirrg+l 














0210 


■fp^tr 


.de 


rlPtr■^^ 














0220 


■tiftr 


.de 


■fptr■^^ 














0230 


up^tr 


.de 


tptr■^2 














0240 


> 


















0250 


.! S^t 


ack location 














0260 


; 


















0270 




.ba 


*1800 




,!*4000 — 0S-65D; *800 — Rpp I 










0280 


ns^t*ck 


.de 


= 














0290 


■fs^t»ck 


.de 


r.stack■^»100 














0300 


■ts^tack 


.de 


■fstack-t»100 














0310 


us^tack' 


.de 


tstack■^*100 














0320 


f 


















0330 


J Thiscellaneous 














0340 


f 


















0350 


rmoKies 


.de 


uptr^^2 




; current number o^f moves 










0360 


i riput. 


.de 


»^f^fc^f 




.iget character 










0370 


;Rpple- 


-*-fcl0ii> 


0S-65D— »2339 














0380 


ou^tpu^t 


.de 


»-i'-i'd2 




;output character 










0390 


^apple- 


-t-fded,! 


0S-65D — *2343 














0400 


re^turrr 


.de 


*0d 














0410 


\-e 


.de 


*0a 














0420 


> 


















0430 




.ba 


ustack'<-*100 




)0S-65D— »317e 










0440 


5 


















0450 


; 


















0460 


; ca 


1 1 major subrou^tires 















0470 


; 










icee- 


20 


88 


IC 


0480 




jsr 


Init 




;init. Ptr's A parameters 


1C03- 


20 


09 


IC 


0490 




jsr 


move 




;call proc. to move toiuer 


1C06- 


4C 


70 


ID 


0500 
0510 


; 


Jmp 


done 














0520 


; recursive 


procedt.4re to move toiuer 










0530 


; 










1C09- 


20 


FI9 


IC 


0540 


mok^e 


jsr 


push 




^push values to stack 


1C0C- 


Bl 


S8 




0550 




Ida 


<nptr>,y 




tne-l: * a-f discs le-ft. 


icaE- 


F0 


20 




0560 
0570 


) 


beoi 


ret 




;i^f = then pop procedure 


1C10- 


Bl 


58 




0580 




'Ida 


<nptr>,y 




;get values to toe passed 


1C12- 


85 


54 




0590 




s-ta. 


Xinmdisc 






1C14- 


C6 


54 




0600 




dec 


•nmd i sc 




;de. # o^f diiscs on tower 


1C16- 


Bl 


5R 




0610 




Ida 


<-l'Ptr>,y 






1C18- 


35 


55 




0620 




e-tA 


•■from 






ICIR- 


Bl 


5C 




0630 




Ida 


<tptr>,y 






ICIC- 


85 


57 




0640 




s^ta 


•using 




; store 'to' in 'usinoi' 


ICIE- 


81 


5E 




0650 




Ida 


<uptr> ,y 






ic2e- 


85 


56 




0660 




Eta 


•to 




;store 'using' in 'to' 


1C.22- 


20 


09 


IC 


0670 
0630 


} 


Jsr 


moye 






1C25- 


20 


3F 


IC 


0690 
0700 


; 


Jsr 


prmoye 




;displa;.' a move 


1C28- 


81 


58 




0710 




Ida 


<nptr-j ^i' 




;pass vaUjes to next proc. 


1C2R- 


85 


54 




0720 




5ta 


•nmdisc 






1C2C- 


C6 


54 




0730 




dec 


•nmdisc 




;dec. # OH* discs on tower 


1C2E- 


81 


5R 




0740 




Ida 


<^fptr>,y 






1C30- 


35 


57 




0750 




sta 


•usinoi 




.(Store '-from' In 'using' 


1 C32- 


81 


5C 




0760 




Ida 


<tptr>,y 






1C34- 


85 


56 




0770 




St a 


•to 






1C36- 


81 


5E 




0780 




Ida 


<uptr> ^y 






1C38- 


85 


55 




0790 




sta 


♦■from 




;store 'using' in '■from' 


lC3fi- 


20 


09 


IC 


0800 
0810 


f 


Jsr 


mo',Je 




.ido recursive call 


1C30- 


S8 






0820 


rs-t 


dey 






.:pop procedure -from stack 


1C3E- 


eo 






0330 




rts 






(continued) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



55 



I GAMES FEATURE I 

Figure 2: Sample Runs 

ENTER TOWER SIZE: 3 



0001 


1 — 3 


0002 


1 — 2 


0003 


3 — 2 


0004 


1 — 3 


0005 


2 - 1 


0006 


2-3 


0007 


1 — 3 



• •• DONE •** 



ENTER TOWER SIZE: 4 



0001 


1 — 2 


0002 


I — 3 


0003 


2—3 


0004 


I — 2 


0005 


3 — 1 


0006 


3—2 


0007 


1 - 2 


0008 


I - 3 


0009 


2—3 


OOOA 


2 — I 


OOOB 


3 — I 


OOOC 


2—3 


OOOD 


I — 2 


OOOE 


1 — 3 


OOOF 


2—3 



• * • DONE * * * 



the current number of moves (lines 
I830-I850), it stores the initial values 
for the FROM, USING, and TO pegs 
(lines I890-I940). Then in lines 
1980-2030 the prompt "ENTER 
TOWER SIZE:" is displayed, and lines 
2080-2360 input the user response. The 
input routine will only accept a one- or 
two-digit hexadecimal number. If a 
one-digit number is entered, the return 
key must follow it. If two digits are 
entered, the program will continue ex- 
ecution and no return needs to be 
entered. 

The next call that the calling 
routine makes, after initialization, is to 
the recursive procedure; MOVE. The 
first operation is to push the variables it 
receives onto the stack. This allows the 
variables for each successive calling of 
the procedure to be maintained sepa- 
rately. When the procedure is finished, 
the stack index will be decremented 
(line 810), effectively popping the 
variables off of the stack. The only 
other thing done with the variables is 
for the procedure to call itself with the 
variables (in slightly modified form) as 
parameters. This the procedure per- 
forms twice. Also, between the two 
recursive calls, the procedure calls 
PRMOVE from line 860-1030 to display 
a move. The variables FROM and TO 
are passed to it. FROM is the peg to 



Listing 2 (continued) 











0840 


; 


















0850 


. 


print 


a move 












0860 


; 










1C3F- 


20 


6D 


IC 


0870 


prmoye 


Jsr 


prnum 


; print current # o-f moves 


1C42- 


Bl 


50 




0880 






Ida 


<.fptr>,y 




1C44- 


09 


30 




0890 






ora 


#»3a 




1C46- 


20 


D2 


FF 


0900 






jsr 


output 


.:print peo( # to take disc 


1C49- 


FI2 


01 




0910 






Idx 


•«01 


.;print ' -> ' 


1C4B- 


BD 


67 


IC 


0920 


Pi 




Ida 


P3,x 




1C4E- 


F0 


06 




0930 






be«i 


P2 




icsa- 


20 


02 


FF 


0940 






Jsr 


output 




1C53- 


ee 






0950 






inx 






1C.S4- 


De 


F5 




0960 






tone 


pi 




1C56- 


Bl 


5C 




0970 


P2 




Ida 


< tptr :> , y 




1C58- 


09 


30 




0980 






ora 


•«30 




ICSH- 


20 


D2 


FF 


0990 






Jsr 


output 


sprint peo|# to put disc on 


1C5D- 


FI9 


0D 




1000 






Ida 


•return 


,»neui line 


ICSF- 


20 


D2 


FF 


1010 






Jsr 


output 




1C62- 


FI9 


eo 




1020 






Ida 


• 1-f 




1C64- 


20 


02 


FF 


1030 






Jsr 


output 




1C67- 


60 






1040 


p3 




rts 






1C68- 


20 


20 


se 


1050 






.toy 


' -> ' 00 




1C6B- 


20 


00 




1060 


> 


















1070 


' 


print 


current number 


o-f moves 










1080 


> 










1C6D- 


ES 


60 




1090 


prnum 


inc 


«nmove£ 


;bump # o-f moves up one 


1C6F- 


D0 


02 




1100 






tone 


prnum 1 




1C71- 


£6 


61 




1110 






inc 


•nraoves+1 




1C73- 


HS 


61 




1120 


prnuffi 1 


Ida 


«nmovestl 




1C75- 


4FI 






1130 






Isr 


a 


;£hi-ft hiorh nibble riorht 


1C.76- 


4n 






1140 






lir 


a 




1C77- 


4fl 






1150 






Isr 


a 




1C78- 


4n 






1160 






Isr 


a 




1C79- 


20 


90 


IC 


1170 






Jsr 


dspbyt 


Jdisplay +irst di^it 


1C7C- 


H5 


61 




1180 






Ida 


»nmove£+l 




ic7e- 


20 


90 


IC 


1190 






jsr 


dspbyt 


.(display second diorit 


1C81- 


05 


60 




1200 






Ida 


«nmoves 




1C83- 


4FI 






1210 






Isr 


a 


;shi+t hioih nibble right 


1C84- 


4n 






1220 






Isr 


a 




1C85- 


4fl 






1230 






Isr 


a 




1C86- 


40 






1240 






Isr 


a 




1C87- 


20 


90 


IC 


1250 






Jsr 


dspbyt 


jdisplay third diait 


ICSfi- 


HS 


60 




1260 






Ida 


*nmoves 




1C8C- 


20 


90 


IC 


1270 






Jsr 


dspbyt 


^display fourth dioiit 


1C8F- 


09 


20 




1280 






Ida 


•«2e 


^output 2 blanks 


1C91- 


20 


02 


FF 


1290 






Jsr 


output 




1C94- 


09 


20 




1300 






Ida 


•«20 




1C96- 


20 


02 


FF 


1310 






Jsr 


output 




1C39- 


60 






1320 
1330 


> 




rts 














1340 


f 


convert byt» to aicii 


and display 










1350 


> 










ICSfl- 


29 


OF 




1360 


elsployt 


and 


•»0-f 


;clear high nibble 


1C9C- 


09 


30 




1370 






ora 


•»30 


; convert to ascil 


icse- 


C9 


30 




1380 






cmp 


•«3a 


;check -for 'a'-'.f' 


icne- 


90 


03 




1390 






tocc 


dspbl 


^branch i-f not 


1CH2- 


18 






1400 






clc 






ICHS- 


£9 


07 




1410 






adc 


»»07 




ICfiS- 


20 


02 


FF 


1420 


dspbl 




Jsr 


output 


jdisplay diorit 


ICfiS- 


SO 






1430 
1440 


1 




rts 














1450 


f 


push 


procedure values 


on stacks 










1460 


y 










1CFI9- 


C3 






1470 


push 




iny 




;bump index +or new values 


ICHH- 


05 


54 




1430 






Ida 


itirimd i sc 


.jpush # o-f discs to stack 


ICHC- 


91 


58 




1490 






sta 


< nptr > , y 




ICHE- 


05 


55 




1500 






Ida 


••fronr 


;push '-from' peg to stack 


1CB0- 


91 


50 




1510 






sta 


t-fp-tr) ,y 




1CB2- 


05 


56 




1320 






Ida 


•to 


;push 'to' peg to stack 


1CB4- 


91 


5C 




1530 






sta 


<tptr) ,y 




1CS6- 


OS 


57 




1540 






Ida 


4usin9 


;push 'using' peg to stack 


1CS8- 


91 


5e 




1550 






sta 


<uptr> ,y 




ICBFI- 


60 






1560 
1570 


> 




rts 














1580 


, 


initialize «tack ptr' 


s 










1590 


> 










ICBB- 


flO 


FF 




1600 


Inl-t 




Idy 


»»-f-f 


;set stack index 










1610 


;9«'ts bumped -to O -for Is-t 


values 


ICBD- 


09 


00 




1620 






Ida 


•l,nstack 


;set 'nmdisc' stack ptr. 


ICBF- 


85 


58 




1630 






sta 


•nptr 




ICCl- 


09 


18 




1640 






Ida 


»h,nstack 




1CC3- 


85 


59 




1650 
1660 


; 




sta 


•nptr+1 




1CC5- 


89 


00 




1670 






Ida 


»l,-f stack 


J set '-from' stack ptr. 


1C.C7- 


85 


50 




1680 






sta 


••fptr 




1CC9- 


09 


19 




1690 






Ida 


#h,-f stack 




ICCB- 


85 


5B 




1700 
1710 


) 




sta 


•+ptr+l 




ICCD- 


09 


00 




1720 






Ida 


•l,tstack 


;set 'to' stack ptr. 


ICCF- 


85 


5C 




1730 






sta 


• tptr 




ICDl- 


09 


10 




1740 






Ida 


•h,tstack 




1CD3- 


85 


50 




1750 
1760 


> 




sta 


•tptr+1 




1CD5- 


09 


00 




1770 






Ida 


tUustack 


;set 'using' stack ptr. 


1CD7- 


85 


5e 




1780 






sta 


•uptr 




1CD9- 


09 


IB 




1790 






Ida 


»h,ustack 




ICDB- 


85 


5F 




1800 

1310 


> 




sta 


•uptr+1 












1820 


f — 


set number o-f moves to zero 










1330 


> 








fmntinu 



56 



MICRO - The 6502/6809 Journal 



No. 54 - November 198; 



GAMES FEATURE 



Listing 2 (continued) 



ICDO- H9 00 


1S40 


Ida »*00 




ICOF- 85 60 


1850 


s-ta «nmo<jes 




ICEl- 85 61 


1860 
1870 > 


s-ta «nfflo<jes+l 






1880 > 


InitlaUze beopinninop 


parame-lers 




1890 ) 






1CE3- FI9 01 


1900 


Ida •«01 




ICES- 85 55 


1910 


s-ta •-from 


*se-t '-from' -to pe« #1 


1CE7- R9 03 


1920 


Ida ««03 




1CE9- 83 36 


1930 


s-ta •-to 


^le-l '-to' -to peg #3 


ICEB- FI9 02 


1940 


Ida ««02 




ICED- 85 37 


1950 
1960 ) 


s-ta •using 


;ie-t 'using' -to peg *2 




1970 , 


display promp-t 






1980 ) 






ICEF- fl2 00 


1990 prompt Idx •*00 




ICFl- BD FC IC 


2000 


Ida pro3,x 




1CF4- F0 IC 


2010 


beoi en-ter 




1CF6- 20 D2 FF 


2020 


Jsr ou-tpu-t 




1CF9- ES 


2030 


inx 




ICFB- D0 F5 


2040 


bne promp-t-t-2 




ICFC- 00 00 0D 


2050 pro3 


.by l-f l-f re-turn 'ENTER TOWER SIZE. ' 00 


ICFF- 45 4E 54 








1D02- 45 52 20 








1D05- 54 4F 57 








1D08- 45 52 20 








1D08- 53 49 5FI 








1D0E- 43 3fl 20 








IDll- 00 


2060 ; 








2070 ; 


inpu-t number o-f discs 


on -tower 




2080 > 






1012- 20 CF FF 


2090 •n-t»r 


Jsr inpu-t 




1D15- C9 0D 


2100 


cmp »re-turn 




1D17- F0 28 


2110 


beoi en-t3 


^done inpu-t-ting 


1D19- 20 54 ID 


2120 


Jsr chno 




IDIC- 80 F4 


2130 


Iocs en-ter 


^no-t a hex digi-t 


IDIE- 20 D2 FF 


2140 


Jsr ou-tpu-t 


^display valid digi-t 


1D21- 20 66 10 


2150 


Jsr s-trip 


js-trip ascii -from dlgi-t 


1D24- 85 54 


2160 


s-ta •nmdisc 


js-tore -firs-t digi-t 


1026- 20 CF FF 


2170 .ntZ 


Jsr inpu-t 




1029- C9 00 


2180 


cmp #re-turn 




102B- F0 17 


2190 


beoi en-t3 


jdone inpu-t-ting 


1020- 20 54 10 


2200 


Jsr chno 




1D30- 80 F4 


2210 


toes en-t2 


^no-t a hex digi-t 


1032- 20 02 FF 


2220 


Jsr ou-tpu-t 


^display valid digi-t 


1035- 20 66 ID 


2230 


Jsr s-trip 


^s-trip ascii -from digi-t 


1038- 06 54 
103fi- 06 54 


2240 
2250 


as I •nmdisc 
as I •nmdisc 


jsi-f-t Is-t digi-t le-f-t 


1D3C- 06 54 


2260 


as I •nmdisc 




103E- 06 54 


2270 


»sl •nmdisc 




1040- 05 54 


2280 


or a •nmdisc 


JpacU 2nd digi-t «ii-th Is-t 


1D42- 85 54 


2290 


s-ta •nmdisc 


js-tore i-t 


1044- 09 00 


2300 •n't:3 


Ida «l-f 


J space 2 lines down 


1046- 20 02 FF 


2310 


Jsr ou-tpu-t 




1049- 09 00 


2320 


Ida «l-f 




104B- 20 02 FF 


2330 


Jsr ou-tpu-t 




104E- 09 00 


2340 


Ida #re-turn 




1050- 20 02 FF 


2350 


Jsr ou-tpu-t 




1053- 60 


2360 
2370 , 


r-ts 






2380 , ch»cU -for ualld hex number 




2390 ) 






1054- C9 30 


2400 chno 


cmp #'0 




1D56- 90 0C 


2410 


bcc inulid 




1058- C9 30 


2420 


cmp #' 1 




1050- 90 09 


2430 


bcc ualid 




105C- C9 41 


2440 


cmp H'O 




105E- 90 04 


2430 


bcc in<jlid 




1D60- C9 47 


2460 


cmp #'0 




1062- 90 01 


2470 


bcc valid 




1064- 33 


2480 InwUd 


sec 




1065- 60 


2490 valid 
2500 ; 


r-ts 






2510 jstrlp 


asc i i -from i npu-t 






2520 ) 






1066- C9 41 


2530 strip 


cmp tt'O 




1068- 30 03 


2540 


bcc s-t3 




1060- 18 


2550 


clc 




106B- 69 09 


2360 


adc •*09 


^add 9 i-f digi-t 'a'-'-f' 


1D60- 29 0F 


2570 s-tS 


and #«0-f 


?s-trip ascii 


106F- 60 


2580 
2590 ; 


r-ts 






2600 ; -finished mow! ha toiuer 







2610 ; 






1070- 02 01 


2620 done 


Idx WSOl 


jprin-t -tha-t i-t is done 


1072- 80 70 10 


2630 


Ida do3,x 




1073- F0 06 


2640 


beoi do3 




1D77- 20 D2 FF 


2650 


Jsr ou-tpu-t 




1D7H- E8 


2660 


inx 




107B- 00 F5 


2670 


bne dorie-f2 




1070- 60 


2680 do 3 
2690 t 


r-ts 


;return -to opera-ting sys-t 


107E- 00 00 00 


2700 


.toy l-f l-f re-turn 


'••• DONE •»• l-f re-turn 00 


1081- 20 20 20 








1084- 20 44 4F 








1D87- 4E 45 20 








1080- 20 20 20 








1080- 0fl 00 00 


2710 } 
2720 


.en 





take the disc from, and TO is the peg to 
put the disc onto. 

Trial Run 

In figure 2 there are two trial runs. 
The first one solves the puzzle for three 
discs and the second for four discs. 
Remember, the number of discs that 
you enter at the prompt 'ENTER 
TOWER SIZE:' is assumed to be a hex- 
adecimal number. A carriage return is 
required if the number entered has only 
one digit. (Ed. Note: The routine is 
written to echo the character received 
to the screen. If your machine's INPUT 
routine does this automatically, the 
character will appear twice on the 
screen. You may want to skip the 
echoes in lines 2130 and 2210.) A four- 
digit hexadecimal number in the first 
column of output shows the number of 
moves. This number will turn over to 
'0000' after it reaches 'FFFF'. The 
number in the second column tells 
which peg to take the disc off of and the 
number in the fourth column tells 
which peg to put the disc onto. 



The author may be contacted at Rt. 1, Box 
56, Sand Springs, OK 74063. 



ilMCftO 



/ 



»i • 1 I ^ 



MEMOREX 

\ferbatim. 

maxell. 

BASF 

wabash 



Diskettes and all your media needs 
Our REGULAR prices are SPECIAL 

CALL FREE (800| 421-3957 

C.O.D. charge cards accepted. 
Excellent dealer program. 




1418 West Shaw Avenue 
Fresno, CA 93711 

/7,Caic<2U (2091 221-1118 



FootkiU of The Sierras 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



57 



Lyco Computer Marketing & Consultants 

TO ORDER jQLL pREE 800-233-8760 

CALL US 



In PA 1-717-398-4079 



November 


810 


ATARI 


32K 


SPECIALS 


400 



Disk Drive .... $429.00 

RAM $ 79.00 

16K $255.00 



800 48K $639.00 



PERCOM : In Stock 

Single Drive • CALL 

Dual Drive CALL 

(Read all Atari Disks) 



PRINTERS : In Stock 

Epson Mx80 $449.00 

Epson Mx 80 FT III $499.00 

Okldata 82A $479.00 

Okidata83A • $719.00 

Okidata 84 $1 089.00 

Citoh CALL 

NEC CALL 

(Interfacing Available) 

JOYSTICKS ; In Stock 

Atari CX-40 $1 8.00 

LeStick $34.00 

Wico Command Control $24.00 



Computer Covers : 

800 $6,99 

^°° $6.99 

810 $6.99 



DISKETTES : In Stock 

Maxell MD1 . . .(10) $34.00 

Maxell MD2 . . .(1 0) $44^00 

Elephant . . .(10) $21 .00 



THIRD PARTY SOFTWARE 
ATARI PROGRAM EXCHANGE 

Eastern Front 1 941 $25.50 

Avalanche $15.50 

Outlaw/Howitzer $15.50 

Dog Dale $15.50 

Wizard of War $31 qo 

Gort S31.00 

Frogger $26.00 

BUSINESS SOFTWARE : In Stock 

Atari Word Processing $109.00 

Letter Perfect ^^ 29.00 

TestWizzard j gg'oo 

Datasam/65 $125.00 

'"•erlisp $125.00 

Monkey Wrench j 4200 



ATARI HARDWARE 

41 Cassette Recorder $75.00 

825 Printer $585.00 

830 Phone Modem $1 49.00 

850 Interface $164.00 

PACKAGES 

CX481 Entertainer $69.00 

CX482 Educator $1 25.00 

CX483 Programmer $49.00 






$325.00 
$28 75 


SOFTWARE 

CXL401 3 ASTEROIDS 


CXL4004 BASKETBALL 


. .$26.75 


CX41 OS BLACKJACK 


...$12.75 


CXL400e COMPUTER CHESS 

CXL401 2 MISSLE COMMAND 

CXL4011 STAR RAIDERS 


...$28.75 
...$28.75 
...$35.00 


CXL4006 SUPER BREAKOUT 

CXL401 3-D TIC-TAC-TOE 


...$28.75 
...$26.75 


CXL4005 VIDEO EASEL 


...$26.00 


CXL4008 SPACE INVADERS 


...$28.75 


CX81 30 CAVERNS OF MARS 

CXL4020 PAC MAN 


...$31.75 
...$32.75 


(NEW) CENTIPEDE 


...$32.75 


CX41 21 ENERGY CZAR 


...$12.75 


CX41 08 HANGMAN 


$12 75 


CX4102 KINGDOM 


.. $12.75 


CX41 1 2 STATES S CAPITALS 

CX41 14 EUROPEAN COUNTRIES. 

CX4101 PROGRAMMING! 

CX4106 PROGRAMMING II 

CX4117 PROGRAMMING III 

CXL4O07 MUSIC COMPOSER . . , 
CX81 02 CALCULATOR 


..$12.75 
... $12.75 

. $19.95 
$22.75 
$22.75 
$33.75 
$28.75 
$16.75 
$45.00 
S89.00 
$45.00 
$65.00 
$65.00 
$99.00 
$21.00 
$19.75 
$13.00 
$45.00 
$45.00 
$45.00 
$45.00 


CX4109 GRAPH IT 

CXL4003 Assembler Editor .... 

CX81 21 Macro AsMmbler 

CXL4002 Atari Basic 

CX81 26 Microsoft Basic 

CXL4018 Pilot Home 

CX405 PILOT EDUCATOR 

CXL4015TELELINK 

CX4123 SCRAM 


CX41 07 Biorhythm 


CX4119French 


CX41 18 German 


CX41 20 Spanish 


CX41 25 Italian 





THIRD PARTY SOFTWARE 

for atari 800 or 400 

KBYTE 

KRAZY SHOOTOUT $35.00 

K-DOS S65.00 

KSTAR PATROL $37.75 

K-RAZY ANTICS S37.75 

K-RAZY KRITTERS $37 .75 

Q-BALL JOYSTICK KIT $6.75 

AUTOMATIED SIMULATIONS 

Star Warrior $28.00 

Crush, Crumble & Chomp $23.00 

WE CARRY MANY OTHER THIRD PARTY PRODUCTS 
YOU CAN CALL FOR PRICES ON AND ASK FOR 
YOUR FREE ATARI PRODUCT CATALOG. 



VIC-20 $189.00 

VIC1530 DATASSETTE $67.00 

VIC1 540 DISK DRIVE $499.00 

VIC1515 PRINTER $355.00 

VIC1 21 3K RAM $35.00 

VIC1110 8K RAM $52.00 

VIC1 21 1 A SUPER EXPANDER $53.00 

VIC-20 SOFTWARE 

VIC1212 PROGRAMMER AID $4500 

VIC1 21 3 VICMON $45.00 

VIC1 906 SUPER ALIEN $23-00 

VIC1914 ADVENTURE 

LAND ADVENTURE $35-00 

VIC1915 PRIVATE COVE 

ADVENTURE $35.00 

VIC1916 MISSION IMPOSSIBLE $35-00 

VIC1 91 7 THE COUNT ADVENTURE .... $35-00 

VIC1919 SARGON II CHESS $35-00 

THIRD PARTY SOFTWARE 

ALIEN BLITZ $21.00 

Omega Race $35.00 

Gorf $32.00 

1 6K RAM/ROM $99.00 

AMOK $21 .00 

SUPER HANGMAN $16.00 

SPIDERS OF MARS $45.00 



POLICY 

Pre-paid orders receive free shipping in the continental U.S. 
Personal checks require four weeks clearance before shipping 
In-Stock items shipped within 24 hours of order 

Back-Ordered and Out-of-Stock items shipped as soon as they are available 
Cancellation of Back-Order and Out-of-Stock items prior to shipping receive 

full refund or credit towards another purchase upon request. 
All products subject to availability and price change. 



TO ORDER 
CALL TOLL FREE 

800-233-8760 

In PA 1-717-398-4079 
or send order to 

Lyco Computer 
P.O. Box 5088 
Jersey Shore, PA 1 7740 



GAMES FEATURE 



VIC/PET GOMOKU 



by David Malm berg 



A fast, machine-language 
version of the popular oriental 
game, with three user-selectable 
styles for the computer's play. 



GOMOKU 

requires: 

VIC with 3K or more extra 

RAM and joystick 

or PET with 8K or more 



GOMOKU is an ancient oriental game 
of strategy. According to Edward 
Lasker's book Go and GOMOKU 
(Dover, 1960), GO means "five" and 
MOKU means "stones." To play, you 
and your opponent alternate placing 
stones on the intersections of the lines 
of a square grid. One person plays with 
white stones and the other uses black 
stones. As the name implies, the object 
of the game is to have your stones oc- 
cupy five adjacent points on a grid — 
vertically, horizontally, or diagonally 
— before your opponent gets five of his 
stones in a row. You must get exactly 
five in a row to win. Connecting two 
chains of stones less than five long to 
form a chain greater than five stones 
long will not win the game. 

The most obvious way a player can 
force a win is to create a situation where 
he has four stones in a row with both 
ends of the chain open for potential 
stones. The opponent will be able to 
block only one end of the chain, so the 
player can win by placing a stone at the 
other end. To reach a forced win with 
an "open-four," the player must first 
create an "open-three." Whenever a 
player threatens a win by making an 
open-three, the opponent must imme- 
diately play a stone at one end of this 
chain of three in order to avoid losing 
the game two moves later. 

As GOMOKU is played in both 
Japan and China, only one type of move 
is illegal: a participant cannot play a 
stone that creates more than one open- 
three simultaneously. The oriental 



originators of GOMOKU felt that the 
game would not be enough of a 
challenge if this type of easy win were 
permitted. 

VIC/PET GOMOKU 

The computerized version of GO- 
MOKU allows the enforcement of the 
no-multiple open-threes rule to be op- 



tional. However, remember that if you 
elect to play without this restriction, 
the computer will play accordingly. 

VIC /PET GOMOKU plays an ex- 
cellent game. Its main counting and 
evaluation routines are written in 
machine language for increased speed 
and enhanced logic. The program takes 
10 to 30 seconds between moves, de- 
pending on the density of stones on the 



Listing 1 



1 RL=22 :S=256*PEEK';648)-l :fl=3e72Q : IFPEEK<643) = 16THEHH=33792 

2 FH=RND';-T1.1 :P0KE36S79,25 ;DD=37154 :P1=371 51 :P2=37152 : V=36878 lE=36876 

3 F0RI=lT08:REflDX:P0KE951+I,X:HEXTI :DHTH1 ,21 ,22,23, 129, 149, 150, 151 :FH=ie 

4 l1L=PEEK<43?+256*PEEK<44.1+3333lB=l1L/256:DIMD<8.1,V;i<14,14:> 

5 F0RI = lT013!REfiDX:P0KEML+X,El:NEXT 

6 DfiTfi2,22,51 ,54,75,91 ,104,125,136,161,178,215,256 

7 e=e+l lF0RI = lT04:REHDX:P0KEML+X,BlNEXT:DHTFll9.,3e6,351,384 

S F0RI = lT08:REl=rDD':i) :NEXT :Dl=lTH-22,-21 , 1 ,23,22,21 ,-1 ,-23 

10 H=87:C=ai !NP*="C" :n=0:H=0:PRINT"3 ailCRO OOMOKU" : IN*="N" 

11 PRINT"ig ev DHVID MflLMBERG" 

12 PRINT"SS^ftNT TO MOVE FIRST ".; :G0SUB85 : PRINT 

13 IFLEFT*';iH*,l> = "V"THENHP*="H" 

14 IN*="W" !PRINT"WHITE OR BLOCK ",• :G0SUB85 SPRINT : IFIN*="B"THEHH=S1 :C=87 

15 P0KE95e,C:P0KE951,H:IN*="2" lPRINT"SHOW SHOULD I PLHV : " sPR INT" Is CHUTIOUS" 

16 PRINT" 2! BfiLFlNCED" -.PRINT" 3: ftOGRESSIVE "; 

17 G0SUBS5:PRINT:X=VF|L';LEFT*<IH*,1>:) 

18 IFX>30RX<1THENPRINT:PRIHT"1 ,2, OR 3 ONLY ";!G0T017 

19 ZZ=e:PRIHT"M=Ll=rV OF'EN 3'S RULE " ,- :G0SUB95 iPRINT : IFIN*<>"V"THENZZ=1 

28 FC=6+2*X:N=S:G=7:MT=14*14:F0RI = lT014:F0RJ=lT014:V;i<I,J>=e:NEXTJ:NEXTI :0=1 

21 PRINTC.HR*<2e.-<"a ^ICRO GOMOKU" 

22 PRINTTHB';0+2)"HHBCDEFGHIJKLMN" :PRINTTFlB<O.V'ai , i i i i i " :FORI=2T013 

23 PRINTTFIB';0-ORIGHT*',STR*<l:',2.1;" I I M I I I I I I I I I I " 

24 NEXTI :PRIHTTfle<:0-l.V'14 ' " !pRINTTflB'Xn-3r< ; "HIV MOVE:" 

25 PRINTC:HR*.;i44:);UH«.!CHR«<123+H>,;"BSISiaarCHR«':i28+C> 

26 IFNP*-:>"H"THEN31 

27 PRINTCHR*<3a);WH*;"liaT'0UB!aiBsaiMIME" :T=H iPOKEV, 15 :F0RK=195T024e :U=TI 

28 P0K"EE,K;IFTI<U+1THEH28 

29 NEXT:POKEE,0:GOSUB96:M=M+1 : VJi'C I , J)=-3e00e :MT=I1T-1 :IFU=HTHEN76 

30 IFMT=0THEN75 

31 PRINTCHR*<3e);WH*;"Hr'0UMaaKBiMI»1EB" : IFM=eTHENI=7 : J=S !G0TO36 

32 0M=C;G0SUe46:MX=-lE15:F0RMI = lT014iF0RMJ=lT014:IFV;i<MI,MJ.l<MXTHEN35 

33 IFV;-;<MI ,MJ)=MXHNDRND'; 1 >>.2THEN35 

34 XJ=MJ+0+2 ■.XI=MI+4 -.L-S+RLWiIXI-l )+XJ :MX=V;';';MI ,Mj;i : I=MI : J=I1J 

35 NEXTMJ.-NEXTMI 

36 B*="" :IFI<laTHENB*=" " 

37 PRINTCHR*<2S.l;MV*THB'-.0+12:),-B*;CHR*<J+64>MID*<STR*';l."',2.1 :N=I :G-J :CL=J+0+2 

38 R-I+4:L=S+RL*<R-1)+CL 

39 P=PEEK';L.1 :P0KEV,15!F0RK=1T06:P0KEL,P:U=TI .■P0KEE,135 

40 IFTKU+STHEN40 

41 POKEL,C:POKEL+fi,0iU=TI :POKEE,240 

42 IFTKU+8THEN42 

43 NEXTK:POKEV,0 5POKEE,0:T=ClGOSUB68:MT=MT-l :IFW=C:THEN76 

44 IFMT=0THEN75 

45 QM=H IG0SUB46 : Vri< I , J>=-30000 JG0T027 

46 1 1 = 1 :JJ=JsP0KE991,QM!F0RIN=-lT01 lF0RJN=-lT01 : IFIN=e(=lNDJN=0THENHEXTJN 

47 F0RKN=iT04sI = II+KN»IN:J=JJ+KN«JN!lFI<lORIM4THENKN=4:G0T067 

48 IFJ<10RJ>14THENKN=4 !G0T067 

49 CL=J+0+2 !R=I+4 !L=S+RL»',"R-1 )+CL :P=PEEK<:L.") : IFP=C0RP=HTHEN67 

50 POKEL,P+12S!VJ:';I,J:)=0:LH=INT';L/256.^ :LL=L-LH*256!POKE962,LL:POKE963,LH 

51 POKEL,P ;SVS<ML> :ZP=PEEK';973:) : IFZP=0THEN55 

52 F0RV=1T0ZP lNC=PEEK';974+V? :NH=PEEKi:982+V) :F=FH s IFNH=0THENHH=NC- :F=FC 

53 v;i < I , J :> =wy. ■; i , j:> + 1 nt < f*nh#nh > : nextv : ne=peek ■; 993 :> 

54 IFNE<>0THENV«< I,J>=Vy.< I , j:)-NE*NE 

55 NH=0:IFPEEK';992)=0THEN67 

56 FORV=1TO4!Q=0:Z=O'CV;>:T=PEEK<L+Z) i IFT<>PEEK<L-Z:)THEN€6 

57 IFT=H0RT=CTHEN59 

5« 0OT066 (continued) 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



59 



GAMES FEATURE 



Listing 1 (continued) 

59 Z=D < V > I QOSUeS llIFPEEK<L><>TTHENQ=Q-l 

60 I FQ>4THEHQ=0 : G0T066 

61 IFQ<4THEN64 

62 IFT=CTHEHQ=2 

63 Q=Q+11 :G0T066 

64 IF<Hl=HORNl=C>flNDNl=N2THENQ=0 

65 I FQ=3flND < N 1 OHflNDN 1 OC >flHD < N2<>HflNDN2<>C. ■) THEHQ=8 

66 HH=NH+Q:NEXTV!IFHH>0THEHVX<I,J> = INT<FH*NH*NH.')+VX<I,J) 

67 HEXTKH;HEXTJHlMEXTIN:I=II ;J=JJ:RETURN 

68 H3=e : FORV= 1 T04 I Z=D < V ) : GOSUBS 1 

69 I FQ=3THEN I FN 1 OCflNDH 1 <>32flNDH2<>Cl=rHDN2<>32THENN3=N3+ 1 

70 IFQ=5THEHW=T:G0T072 

71 NEXTV 

72 I FQ=5flNDW=HTHENFH=FH* 1 . 2 

73 IFZZTHENN3=0 

74 RETURN 

75 PRIHTMV«"JOSTflLEMflTE" iG0T083 

76 IFHP*="C"flHDW=CTHEMM=M+l 

77 IFW=HTHEHPRIHTMV*"Mf'OU WON IH"M" MOVES" 

78 IFW=CTHEHPRINTMV*"BI WON IH"f1" MOVES" 

79 IFM<10THENPRINT"GOOD GAME!" 

30 IFM>9flNDM<20THENPRINT"CLOSE GfiME ! " 

81 I FM> 1 9flHOM<30THENPR INT" GREAT GAME ! " 

32 IFM>29THENPRINT"FflNTflSTIC GAME!" 

S3 PRINT"WANT TO PLAV AGAIN" ; iGOSUBSS l IFLEFT*< IN*, 1 > = "V"THEH10 

84 END 

85 ZC.= 1 :ZT=0 

86 GETZ*lIFZ*<>""THEN89 

87 IFTI>=ZTTHENPRINTMID*<"? " ,ZC, 1 > ; "||" ; :ZT=TI+30 !ZC.=3-ZC 

88 G0T086 

89 IFZ*<>CHR*<13>THENIN*=Z* 

90 PRINT"? "; IN* ;: RETURN 

91 Q=l lLN=L+Z 

92 IFPEEK<LN>=TTHENQ=Q+1 :LN=LN+Z IG0T092 

93 N1=PEEK<LN> :LN=L-Z 

94 IFPEEK';LN.')=TTHENQ=Q+1 :LN=LN-Z:G0T094 

95 N2=PEEK',LN> (RETURN 

96 XJ=G+0+2lXI=N+4lL=S+RL*<XI-l>+XJ;P=PEEK<L> !FS=T : IFFS=PTHENFS=128+FS 

97 P0KEL,FS:FZ=P:ZT=TI+9 

98 POKEE , : DX=0 I DV=0 :FB=0 : GOSUB 112:1 FDXORDVORFBTHEN 101 

99 IFTKZTTHEN98 

100 Z=FZ!FZ=PEEK<L> :POKEL,Z :ZT=TI+9 :G0T098 

101 IFFBTHEN109 

102 P0KEL,PlN=N+DV:G=G+DX:P0KEE,135!U=TI 

103 IFTKU+9THEN103 

104 IFN>14THENN=1 

105 IFN<:iTHENN=14 

106 IFG>14THENG=1 

107 IFG<1THENG=14 

108 GOT096 

109 IFP=C0RP=HTHEH98 

lie G0SUB681IFN3MTHEN98 

1 1 1 POKEL ,T:POKEL+A,0: POKE V , 8 I POKEE , : 1 =N : J=G : RETURN 

1 1 2 POKEDD , 1 27 : B=PEEK < P2 > AND 1 23 : J0=- < B=0 > : POKEDD , 255 ; B=PEEK < P 1 > 

113 J2=-<<BAND16>=0.') : J3=-< <BANO4>=0.') :FB=-< <BAN032.')=a> l Jl=-< (BANDS.'J'O) 

114 IFJ0THENDX=1 

115 IFJ1THENDV=1 

116 IFJ2THENDX=-1 

117 IFJ3THENDV=-1 

118 RETURN 
READY. 



grid. By comparison, the first version of 
GOMOKU I wrote was entirely in 
BASIC and took from three to six 
minutes between moves — and it did 
not play half as well as the current ver- 
sion. VIC/PET GOMOKU should be 
capable of holding its own against even 
very good human players — especially 
if the computer moves first. 

VIC/PET GOMOKU has three 
styles of play: cautious, balanced, and 
aggressive. These styles refer to how 
much the computer will weigh defen- 
sive vs. offensive moves in its evalua- 
tion of the merits of its next move. If 
you select a balanced style, both of- 
fense and defense have equal weights. 
You will find the computer will win 
more games when it is playing aggres- 
sively. However, when you select the 
cautious style for the computer, you 
may not be able to win often because 
many games will end up in stalemate; 



60 



the computer will unrelentlessly block 
your chances for any kind of a winning 
pattern. When the computer loses a 
game, it will automatically play a more 
aggressive game the next time. 

The VIC Version 

The VIC version of GOMOKU 
needs at least 3K of additional memory. 
This can be obtained by using any of 
the standard VIC Super Expander, 3K, 
8K, or 16K memory cartridges. 

The program is written in two parts. 
Listing 1, the main part, is written in 
BASIC and should be keyed-in exactly 
as shown in the listing (i.e., with no 
unnecessary spaces to conserve mem- 
ory). Listing 2, a hex-dump of the 
machine-language routines, shows the 
machine code being located from $1300 
to $14AB. These locations assume you 
are using either the Super Expander or 
the 3K memory cartridges, which cause 



MICRO - The 6502/6809 Journal 



the start of BASIC to be located at 
$0400 (just like the PET). If you are 
using either the 8K or 16K memory ex- 
panders, this machine code should be 
located from $2100 to $22AB because 
the start of BASIC is relocated to $1200 
by the VIC's operating system. When 
you use a monitor to enter and save the 
code in the hex listing, there is no need 
to worry about relocating the two-byte 
addresses since lines 4-6 of the BASIC 
program automatically adjust them to 
correspond to the memory configura- 
tion of your VIC. 

To create a working copy of GO- 
MOKU for the VIC, first load the 
BASIC portion (listing 1). Then load 
the machine-language code you had 
previously saved with the monitor by 



Listing 2 


















. ; 1300 


20 


ED 


13 


fi9 


00 


85 


5C 


35 


. : 130S 


5D 


35 


48 


85 


49 


1=15 


43 


35 


. ; 1310 


42 


20 


02 


14 


20 


4D 


13 


fl5 


. ; 1318 


44 


C9 


00 


F0 


0C 


fl6 


49 


fl5 


. : 1320 


3C 


95 


4B 


fl5 


3D 


95 


53 


E6 


. : 132S 


49 


FI5 


48 


CS 


07 


F0 


05 


E6 


. : 1330 


48 


4C 


0D 


13 


20 


38 


13 


60 


. ; 1 338 


fl2 


00 


B5 


32 


9D 


86 


03 


BD 


. : 1 340 


84 


03 


95 


32 


E0 


2B 


FO 


04 


. : 1 348 


ES 


4C 


3fi 


13 


60 


h5 


3C 


C9 


. : 1 350 


03 


Fe 


09 


fi5 


3D 


CS 


03 


F0 


. : 1 358 


10 


4C 


89 


13 


FI5 


45 


C.5 


33 


. : 1 360 


D0 


07 


fl9 


00 


85 


3D 


4C 


C5 


. : 1368 


13 


fi5 


45 


C5 


33 


F0 


IH 


C5 


. : 1370 


32 


F0 


le 


fi5 


5B 


C.5 


4fl 


D0 


. : 1378 


05 


fl9 


0FI 


4C. 


30 


13 


fl9 


08 


. : 1380 


35 


3C 


fi9 


00 


85 


3D 


4C 


C5 


. ;13S8 


13 


fiS 


3C 


C9 


04 


D0 


IC 


fl5 


. r 1390 


46 


C5 


32 


F0 


0D 


FI5 


47 


C5 


. : 1398 


32 


F0 


07 


fl9 


0D 


35 


3C 


4C 


. ; 13fi0 


C5 


13 


fi9 


00 


35 


3C 


35 


3D 


. : 13FIS 


4C 


C5 


13 


fl5 


3D 


C9 


04 


D0 


. : 13B0 


14 


FI5 


46 


C5 


33 


F0 


EB 


flS 


. ; 1 3B8 


47 


C5 


33 


F0 


E5 


Fl9 


0B 


35 i 


. ; 13C0 


3C 


Fl9 


00 


35 


3D 


Fl9 


00 


85 


. : 1308 


44 


fl5 


3C 


C9 


00 


D0 


09 


fl5 


. : 13D0 


3D 


C3 


00 


D0 


09 


4C: 


E2 


13 


. : 13DS 


fi5 


3D 


C9 


00 


D0 


04 


fi9 


01 


. ; 13E0 


35 


44 


Fl5 


4Fl 


C5 


47 


D0 


04 
B5 


. : 13E8 


fl9 


01 


35 


5C: 


60 


Fl2 


00 


. : 13F0 


32 


9D 


34 


03 


BD 


86 


03 


95 


. : 13F8 


32 


E0 


2B 


F0 


04 


E8 


4C 


EF 


. : 1400 


13 


60 


fl5 


3E 


85 


40 


flS 


3F 


. : 1408 


35 


41 


Fl6 


42 


B5 


34 


35 


43 


. : 1410 


Fl2 


00 


86 


3C 


86 


3D 


36 


45 


. ; 141S 


86 


46 


36 


47 


36 


4fl 


fi5 


43 


. ; 1420 


38 


C9 


80 


B0 


0E 


fi5 


40 


38 


. : 1428 


E5 


43 


B0 


02 


C6 


41 


85 


40 


. ; 1430 


4C. 


3E 


14 


E9 


30 


IS 


65 


40 


. : 1438 


90 


02 


E6 


41 


85 


40 


fi0 


00 


. : 1440 


Bl 


40 


35 


47 


Fl5 


3E 


85 


40 


. : 1448 


Fl5 


3F 


85 


41 


E8 


flS 


43 


38 


. : 1450 


C:9 


80 


B0 


0C. 


18 


65 


40 


90 


. ; 1453 


02 


E6 


41 


85 


40 


4C. 


6F 


14 


. ; 1460 


E9 


80 


35 


44 


fl5 


40 


38 


E5 


. ; 1468 


44 


B8 


02 


C6 


41 


85 


40 


fl0 


. : 1470 


00 


Bl 


40 


C9 


20 


D0 


0Fl 


33 


. : 1478 


E0 


03 


B0 


2F 


E6 


5D 


4C 


flB 


, : 1430 


14 


C5 


32 


D0 


02 


E6 


3C 


C5 


. : 1483 


33 


D0 


02 


E6 


3D 


E0 


01 


D0 


. : 1490 


02 


85 


4fi 


E0 


04 


D0 


02 


85 


. : 1498 


45 


E0 


05 


D0 


fHF 


85 


46 


C5 


. ! 14fi0 


32 


D0 


02 


C6 


3C 


C.5 


33 


D0 


. : 14fi8 


02 


C.6 


3D 


60 


Flfi 


flfl 


Flfl 


flfl 



No. 54 - November 1982 



GAMES FEATURE 



using the command LOAD "name", 
1,1. The I's at the end of the LOAD 
will load the code at its absolute loca- 
tion (i.e., $1300-$14AB or $2100- 
$22AB), rather than automatically be- 
ing relocated to the start of BASIC. 
After both parts have been loaded, issue 
the command SAVE "VIC GOMOKU" 
and you will save a copy that combines 
both parts and can be used independently 
of whatever memory configuration is 
operating in the VIC. 

The VIC version of GOMOKU uses 
the joystick to indicate your move. 
Once you have moved the cursor to your 
desired location, just hit the fire-button. 

The PET Version 

The machine-language code in the 
hex-dump (listing 2) will work without 
any changes in the PET. However, 
several lines of the BASIC program 
must be changed. Specifically, listing 3 
contains all the lines that must be 
changed in listing I to get GOMOKU to 
work on the PET. In addition to these 
differences, lines 7, 116, 117, and 118 
of listing 1 should not be included in 
the PET version. The BASIC instruc- 
tions should be typed without any 
unnecessary spaces to assure that the 
BASIC part does not run into the 



Listing 3 



:E=12*4096 :V=E :PI=5*4096 



RL=40:S=32?'67 

FH=RHD';-TI) 

F0RI = 1T08 :REHDX !P0KE951 + I ,X iNEXTI :DPITH1 ,39,40.-41 , 129, 167, 168, 169 :FH=10 

ML=PEEK<40)+256*PEEK<41 )+3839 :DIMD<8) ,VK<,' 14, 14) ,DR';9) ,DC<9) 

F0RI = lT09:REHDDR';i:',DC<I.) iNEXTI 

DHTfll,- 1,1, 0,1, 1,0, -1,0, 0,0, 1,-1, -1,-1, 0,-1,1 

9 F0RI = lT08iREHDD<:i:> iNEXT :DHTfl-40, -39, 1 ,41 ,40,39,-1 ,-41 

10 H=81 iC=87iNP*="C":M=e:W=0sPRINT"3 31ICR0 GOMOKU" : I N*="H" 

14 IN*="W":PRINT"WHITE OR BLACK " ; :00SUB85 :PRINT : IFIN*="B"THENH=S7 :C=S1 

112 GETF*:IFF*=""THENRETURN 

113 IFF*=CHR*<13)THENFB=1 :RETURN 

114 I FF*< ■' 1 " ORF*> " 9 " THENRETURN 

115 QQ=flSC<F*)-4S:DX=DC';QQ) :DV=DR<QQ) :RETURN 



machine-code part. If you have an 
80-column screen, change RL in line 1 
to 80, the DATA values in line 3 to 1, 
79, 80, 81, 129, 207, 208, 209, and the 
DATA values in line 9 to - 80, - 79, I, 
81, 80, 79, -1, -81. 

To create a working PET copy of 
GOMOKU, first load the BASIC part, 
then load the machine code previously 
saved by the monitor (it will always be 
located from $1300 to $I4AB in the 
PET version), then issue the command 
SAVE "PET GOMOKU" to save a copy 
that combines both parts. 

The PET version uses the numeric 
keyboard to indicate your move. Once 
the cursor is where you wish to move, 
just hit RETURN to enter the move. 



Acknowledgement 

I published an earlier version of PET 
GOMOKU in the December, 1979 
issue of CURSOR (Box 550, Goleta, CA 
93 1 1 6). That version benefitted from 
many improvements suggested by Glen 
Fisher. To the extent that his sugges- 
tions survived to the current VIC /PET 
version, his help is gratefully 
acknowledged. 

The text foi this article was submit- 
ted by the author as a WoidPio file. The 
edited file was then tiansmitted to our 
Compugiaphic through oui FOCUS 
CompuPlus system. 

JMCRO 




SIGNALMAN MARK I DIRECT CONNECT 
MODEM - $89.50 

Standard SOO-baud, full duplex, 
answer/originate. Powered by 
long lasting 9-volt battery (not 
included). Cable and RS-232 
connector included. 

EPROMS - HIGH QUALITY, NOT JUNK 

Use with PET, APPLE, ATARI, SYM, AIM, etc. 450 ns. $6.50 
for 2716, $12.50 for 2532. We sell EPROM programmers 
for PET and ATARI 



BY* INCH SOFT 
SECTORED DISKETrES 

Highest quality. We use them on 
our PETs, APPLES, ATARIs, and other 
computers. $22.50/10 or $44.50/20 



NEW! C. ITOH STARWRITER F 10 
DAISY WHEEL PRINTER 

Letter quality, flawless copy at 40 char/sec. Bidirectional 
printing, 15-inch carriage, uses standard Diablo ribbons 
and print wheels. **^^ - ^'^9f 

PARALLEL - $1495, RS-232 - $^TRACTORS - $210 




MAE SOFTWARE DEVELOPMENT SYSTEM 
FOR PET, APPLE, ATARI 

'The Compatible Assembler" 

• Professional system for development of Machine Lan- 
guage Programs. 31 Characters per label. 

• Macro Assembler/Text Editor for Disk-based systems. 

• Includes Word Processor for preparation of Manuals, etc. 
•Standard Mnemonics - Ex.: LDA (LABEL), Y 

• Conditional Assembly, Interactive Assembly. 

• Editor has string search/search and replace, auto line 
numbering, move, copy, delete, uc/lc capability. 

• Relocating Loader to relocate abject modules. 

• Designed with Human Factors Considerations. 

$169.95 

FLASH!! EHS Management has decided to allow $60.00 credit 
to ASM/TED owners who want to upgrade to MAE. To gel this 
credit, return ASM/TEO manual with order for MAE 

ATARI AND PET 
EPROM PROGRAMMER 



Programs 2716 and 2532 
EPRQMs. Includes hardware 
and software. PET = $75110- 
ATARI (includes sophisticated 
machine language monitor) = 
$119.95 



.^^/fl 




PET BASIC SCROLL PROGRAM 

Scroll thru basic program using Cursor up/down keys. 
Specify computer. $6.00 on cassette, $9.00 on disk. 

Flip 'N' File diskette storage case (50-60 disks )- 
$21.95 

Memory Test for Apple on Disk = $9.95, on Tape 
= $6.95 

System Saver for Apple - Fan, Surge Protection, 2 
extra outlets, Apple power cord = $75.00 

BMC Green Screen Video Monitor. 

12 inch CRT, sharp, crisp 40 or 80 column display. 
= $90.00 

DC Hayes Smart Modem = $235.00, Micro Modem 
II = $289.00, Chronograph = $225.00 

C. Itoh Prowriter Printer. Better than MX80, We use 
constantly with our Apple and PET. Can be used on 
IBM, Atari, TRS-80, etc. 120 cps, friction and tractor 
feeds, hi resolution dot graphics, nice looking, high 
quality construction. Parallel - $499.00, with IEEE 
interface for commodore - $599.00, RS232 - $660.00 



3239 Linda Dr. 
Winston-Salem, N.C. 27106 
(919)924-2889 (919)748-8446 
Send for free catalog! 




No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



61 



GAMES FEATURE 



Number Shuffle on the Atari 



by Frank Roberts 



A computer version of the 
popular game Magic Square. 

Number Shuffle 

requires: 

Atari 400 or 800, 8K 

In the days of yore, before Rubik's 
Cube, there existed a two-dimensional 
puzzle called Magic Square. It was 
played by rearranging a random set of 
numbers within a four-by-four matrix 
until the numbers were in numerical 
ascending or descending order. 

This program is a computer simula- 
tion of that puzzle, and is built around 
a six-by-six matrix. All positions sur- 
rounding the central matrix are set to a 
value of - 1 and used only for com- 
parison and validation of moves. One 
position of the four-by-four center 
matrix, set to zero, is graphically 
represented by a blank space. Only the 
numbers horizontally or vertically adja- 
cent to the space may be moved into 
that vacant space. 

The game begins after the numbers 
in the NBR array are shuffled 100 times 
(lines 210-250] and set into the play- 
field array, BRD (300-370). Once the 
board is displayed on the screen, the 
user is prompted for a choice of num- 
bers to move into the empty space. If 
the number is valid, the number and the 
space are switched. The X and Y arrays 
hold the screen coordinates for each 
number in the central matrix. The 
switch is made in lines 530-560 and 
subroutine 20-25. Lines 600-650 check 
the board after every switch. If all 
numbers are in proper ascending order, 
the program terminates with a con- 
gratulations and some fanfare. It will 
also display the total number of moves 
made to solve the puzzle. To check for 
a solution in descending order, just 
change line 610 to FOR J = 29 TO 8. 

Note: If you wish to see 
display of finish without working 
through the whole puzzle, just type 
"GOTO 700." 



REM «««««« 
REM NUMBER 
REM 

REM Frank 
REM 3736 F 
REM Ft. Ua 
REM ****** 
REM 

I GOTO 30 
I EiRD(P)=MO 
; PRINT »6 
DIM BRD(3 
X(8)=3:X< 
X(M)=X(8 
X(2e)=X(S 
X(26)=X(S 
REM 

Y(e)=5: Y( 
Y ( 9 ) = Y ( 8 ) 
Y( ie)=Y(8 
Y( 11 )=Y(8 
REM 

GRAPHICS 
FOR MUSIC 
:NEXT MUS 
PRINT ■>D 
GRAPHICS 
PRINT -NU 
SCRAMBLED 
PRINT 'ft 
AN EMPT Y' 
PRINT "SO 
THE ONLY- 
PRINT 'VA 
PRINT 'AD 
PRINT :PR 
REM ***** 

8 GRAPHICS 
e POSITION 
e POSITION 

REM **** 

e FOR j=e 

9 REM **** 
e FOR J=l 

A=INT(RN 
B=INT(RN 
IF B=» T 
IF B=l T 
IF B=2 T 
IF B=3 T 
TEMP=NBR 
e NEXT J 
9 REM **** 
e FOR J=l 

c=e 

e FOR J=8 

IF J=12 

C = C+1 
e BRD(J)=N 
e IF BRD(J 
9 NEXT J 

REM **** 
e GRAPHICS 
e FOR ROW= 
e PRINT *6 
e FOR J=C 

IF BRD(J 
e IF 6RD<J 
PRINT t(6 
e NEXT J 

C = Cf6 

PRINT tt6 
e NEXT ROW 



««««««««***«*****«««««««««««««« 
SHUFFLE 

Roberts 
erndale Drive 
yiie, IN «615 
******************************* 



VE:POSITION X(P),Y<P):IF BRD(P)<ie THEN PRINT W6-- •■ 

BRD<P) rRETURN 

6),NBR(16),X(36),Y(36),R«(ie) 

9)=6:x( ie)=9:x< 1 1 ) = i2 

):x(i5)=x(9):x<i6)=x(ie):X(i7)=X(ii) 

):x(2i)=X(9):X(22)=x(ie):x<23)=X(ii) 

):X(27)=X(9):X(Z8)=X(ie):X(29)=X(ll) 

i«)=s:Y(2e)=n :y(26) = 14 

:Y(15)=Y(M):Y(21)=Y(Z«):Y(27)=Y(Z6) 

):Y(16)=Y(l«):Y(Z2)=Y<2e):Y(Z8)=Y(26) 

):Y(17)=Y<l«):Y(Z3)=Y<Ze):Y(29)=Y(26) 

2:P0SITI0N 2,«:PRINT t(6;'NUMBER SHUFFLE' 

=5ee TO e step -1.5:S0UND 6,e,8,MUSIC:PDKE 768, INT(RND(e)*ZZZ) 

ic:souND e,e,e,e 

YOU WANT INSTRUCTIONS ';:INPUT R«:IF R»(1,1)<>'Y' THEN 188 
e:POSITION Z,7 
MBER SHUFFLE IS A SOLITAIRE GAME IN UHICH IS NUMBERS ARE 

U ITHIN' 
« X 4 SQUARE. THE NUMBERS ARE THEN MOVED ONE AT A TIME INTO 

UARE IN AN ATTEMPT TO ARRANGE THE NUMBERS IN NUMERICAL ORDER. 

LID MOVE IS ONE OF THE FOUR NUMBERS' 

JACENT TO THE EMPTY SPACE IN THE SQUARE.' 

INT 'UHEN YOU ARE READY, PRESS RETURN ';: I NPUT R« 

SET UP BOARD ***** 

l:POSITION 4,5:PRINT t(6 ;" STANDBY .... ' 

3,7:PRINT t(6;'I'M MIXING UP' 

5,9:PRINT lt6;'THE BOARD' 

* CHOOSE SET OF RANDOM NUMBERS ***** 
TO 15:NBR( J+1)=J:NEXT J 

* NOW SHUFFLE NUMBERS ***** 

TO lee 

D<e)*i5)+i 

D<e)*4) 

HEN B=A-l:IF B<1 THEN B=A+1 
HEN E=A-4:IF E<1 THEN B=A+4 
HEN B=A+l:IF B>16 THEN B=A-1 

hen b=a+4:if b>16 then b=a-4 
<a):nbr(A)=nbr(B):nbr(B)=temp 

* now set up board ***** 

TO 36:BRD(J)=-1:NEXT J 

TO 29 

OR J=13 OR J=18 OR J=19 OR J=24 OR J=25 THEN 378 

BR(C) 

)=e THEN P=J 

* DISPLAY BOARD ***** 
1:P0KE 752, 1 :C=S:P0SITI0N 6,4 

1 TO 4 

:PRINT 1(6; ' ' ; 
TO C + 3 

)=e THEN PRINT t(6;' ';:GOTO 468 
)<1« THEN PRINT nS;' ' ; 
;BRD( J) ; ' ' ; 



(continued) 



62 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



L 



GAMES FEATURE 



Number Shuffle (continued) 



499 REM «*«** GET MOUE NUMBER «ND PROCESS «<*«« 

50« POP :TRY=TRY+1 

585 PRINT • •■•POKE 654 , PEE K ( 656 ) - 1 

5ie PRINT "ENTER NUMBER TO MOVE: "; 

520 INPUT MOgE 

539 IF BRD(P-1 ) =MOUE THEN BRD ( P- 1 ) =0 : GOSUB C0 : P=p- 1 : POS I TI ON X ( P ) , Y ( p ) 
:PRINT tl6; ■ 'CGOTO 600 

540 IF BRD(P-6)=MGVE THEN BRD ! P -6 ) =« : GOSUB 20 : p = p-6 : POS I T I ON X<P),Y(P) 
:PRINT tl6; • 'ICOTO 600 

550 IF BRD(P + 1 ) =MOVE THEN BRD ( P + 1 ) = 8 : GOSUB 29 : P = P+ 1 : POS I T I ON X ( P ) , Y ( P ). 

:PRINT tl6; ■ "IGOTO 609 
560 IF BRD(P+6)=M0VE THEN BRD < P + 6 ) =0 : GOSUB 29 : P = P + 6 : POS I T I ON X(P),Y<P) 

:PRINT tl6- ' '^GOTO 600 
570 PRINT ■>ILLEG«L MOVE":GOTO 510 

599 REM *«*«« CHECK BOR«D FOR UIN ♦*«*« 

600 C=0:IF BRD(29)<>9 THEN POKE 656 , PEEK ( 656 >- 1 : GOTO 50* 
610 FOR J=8 TO 2S 

620 IF J = 12 OR J = 13 OR J=18 OR J = 19 OR J = 24 OR J = 25 THEN 650 

639 C=C+1 

631 PRINT C ,BRD< J) 

649 IF BRD(J)=C THEN 659 

642 POKE 656,PEEK<656)-1 

644 GOTO 509 

450 NEXT J 

69? REM ♦♦*«♦ CONGRATULATE UITH FANFARE ♦♦♦«♦ 

700 GRAPHICS l-.PQSITION 2,6:PRINT »6 ;' CONGRATULATIONS " 

710 POSITION 3,8:PRINT #6;'Y0U DID IT IN" 

720 POSITION 5,19:PRINT lt6;TRY;' MOWES" 

729 REM ♦«**♦ PLAY SONG ♦«*** 

890 FOR J=l TO 4 

810 RE/^0 S,S2,I 

820 SOUND 0,S, 19,8:S0UND 1 , S- 1 , 10 , 4 : SOUND 2 , S2 , 1 « , 4 : SOUND 3,32-1,10,2 

830 FOR K=l TO I:NEXT K 

840 NEXT J 

850 SOUND 0,0,9,0:SOUND 1 ,«, ,«: SOUND 2 , , , : SOUND 3,0,0,0 

900 DATA 162, 81, 15, 121, 60, 20, 96, 47, 25, 81, 40, 70, 96, 47, 29, 81, 40, 190 



JMCftO 



Letterbox 



Two Many Lines 

Kerry Lourash, author of "Sur- 
change for OSI" in the August issue, 
noticed an error in his listing. On page 
77, there are two Hne numbers for 
1100. Type in only one. 



Move the Decimal 

An error in the September Software 
Catalog last month could have bank- 
rupted MicroSoftware International, 
Inc. Computer Business Softwaie was 
wrongly listed as $64.70. It should have 
been $6470.00. Pardon our slip. 



VOICE I/O THAT WORKS! 



for the APPLE II and Commodore computers 



Voice I/O has come a long way from the 
barely intelligible compuler speech o1 on- 
ly a few years ago. It is now possible to 
enter data or commands to your computer 
just by talking to it and the computer can 
talk back with clear, pleasant, human 
sounding voice. 

The COGNtVOX models VlO-1002 (tor 
Commodore) and VIO-1003 (for the Apple 
II + ) are at the forefront of a new genera- 
tion of Voice I/O peripherals that are easy 
to use, offer excellent performance and 
are affordably priced. 

SOME SPECIFrCATlONS 

COGNIVOX can be trained to recognize 
up to 32 words or phrases chosen by the 
user. To train COGNIVOX to recognize a 
new word, you simply repeat the word 
three times under the prompting o1 the 
system. 

COGNIVOX will also speak with a voca- 
bulary of 32 words or phrases chosen by 
the user. This vocabulary is independent 
of the recognition vocabulary, so a dialog 
with the computer is possible. Memory re- 
quirements for voice response are approx- 
mately 700 bytes per word. 

For applications requiring more than 32 
words, you can have two or more vocabu- 
aries and switch back and forth between 
them. Vocabularies can also be stored on 
disk. 



m 




HOW IT WORKS 

COGNIVOX uses a unique single-chip 
signal processor and an exclusive non-li- 
near pattern matching algorithm to do 
speech recognition. This gives reliable op- 
eration at low cost. In tact, the perfor- 
mance of COGNIVOX in speech recogni- 
tion is equal or better to units costing 
rvvany times as much. 




For voice output, COGNIVOX digitizes 
and stores the voice of the user, using a 
data compression algorithm. This method 
offers four major advantages: First there 
are no restrictions to the words COGNI- 
VOX can say. If a human can say it, COG- 
NIVOX will say it too. Second, it is very 
easy to program your favorite words. Just 
say them in the microphone. Third, you 
have a choice of voices: male, female, child, 
foreign. Fourlh and foremost, COGNIVOX 
sounds very, very good. Nothing in the 
market today can even come close to the 
quality of COGNIVOX speech output. You 
can verify this yourself by calling us and 
asking to hear a COGNIVOX demo over 
the phone. Hearing is believing. 

A COMPLETE SYSTEM 

COGNIVOX comes assembled and test- 
ed and it includes microphone, software, 
power supply, built in speaker/amplifier 
and extensive user manual. All you need 
to get COGNIVOX up and running is to 
plug it in and load one of the programs 
supplied. 



It is easy to write your own talking and 
listening programs too. A single state- 
ment in BASIC is all that you need to say 
or recognize a word. Full Instructions on 
how to do it are given in the manual, 

COGNIVOX model VIO-1002 will work 
with all Commodore computers with at 
least 16k of RAM. Model VlO-1003 re- 
quires a 48k APPLE 1! + with 1 disk drive 
and DOS 3.3. 

ORDER YOUR COGNIVOX NOW 

Call us at (805) 685-1854 between 9am 
and 4pm PST and charge your COGNIVOX 
to your credit card or order COD. Or send 
us a check in the mail, specifying your 
computer. Price for either model of COG- 
NIVOX is $295 plus $4 shipping in the U.S. 
(foreign add 10% we ship AIR MAIL). 

VOICETEK 

DeptS , P.O. Box 388 Goleta, CA 93116 

Also available lor rhe AIM-65. 
Call or write for details. 



OSI Delete Modifications 

Claude Banon of Quebec, Canada, 
sent in this update. 

In the August issue of MICRO, Mor- 
ris and Morishita wrote a program for 
"Delete on the OSI." Here is a 
modification that will save you seven 
bytes in your program. 

In their program to get the code for 
the "OK", you go through the output 
to CRT routine, and then get back to 
BASIC in address $A319. Another way 
would simply get you back in BASIC 
through the warm start located at 
$A274. This routine will print the 
"OK". Here are the necessary changes 
in your BASIC program: 

18 N = 57; F0RX=MT0M + N-1; 
READ J: POKE X, J: NEXT 

22 A = INT (M/256): B = M - 256*A: 
POKE M-6, A: POKE M- 7, B 

42 DATA 144, 5, 32, 110, 2, 240, 219, 
76, 116, 162 

There is no need for a line 44. 

I would also like to point out a little 
mistake in the text. When you write 
that the code is relocatable with the ex- 
ception of the JSR at $026E, it should 
be $0266. 

JMCftO 



No. 54 - November 1 982 



MICRO - The 6502/6809 Journal 



63 





^ri 




r4\ 


/ / 1 ■ «Wi400 1 


\ 




i^ms\ 



A 

ATARI 




400 

16K *269 

32K *349 

48K *429 

410 Recorder $ 76.00 

810 Disc Drive $449.00 

822 Printer $269.00^ 

825 Printer $589.00 

830 Modem $150.00 

820 Printer $259.00 

850 Interface $169.00 

CX40 Joystick $ 18.00 

CX853 16K RAM $ 77.95 



. HOT ATARI- 
JK GAMES ^ 

PAC-MAN $3500 

Centipede $35.00 

Caverns of Mars $32.00 

Asteroids $29.00 

Missile Command $29.00 

Star Raiders $39.00 

Ghost Hunter. $24.00 

^^ RASTER $gyjt 
^^ BLASTER ^^4 



DATASOFT 

GamM for tha Atari 

Padlic Coast Higtiway $25.00 

Canyon Climber $25.00 

Tumble Bugs $2500 

ShooBng Arcarde $25.00 

Clows and Balloons $25.00 

Graphic Master $30.00 

Graphic Generator $13.00 

Micto Painter $25.00 

Text Wizart $89.00 

Spell Wizard $64.00 

Bishops Square „.... $25.00 



VISICORP 

VISKALC 

Apple II + $189.00 

Atari $189.00 

Commodore $189.00 

IBM $189.00 

For APPLE, IBM, FRANKUN 

Vlsidex $189.00 

Visifile $189.00 

Visiplot :^. $159.00 

Visiterm $189.00 

VlsitreniyPlot $229.00 

Visi Schedule $229.00 

Desktop Plan $189.00 



800 — 48K 

^669 



MiCTOtek 16K RAM $ 74.95 

Ramdisk (128K) $429.95 

Itec 48K Board $159.00 

Itec 32K $ 74.00 

One Year extended warranty $ 70.00 

481 Entertainer $ 69.00 

482 Educator $13000 

483 Programmer $ 49.00 

484 Communicator $344.00 



CBS 

ROM CARTRIDGE GAMES 
FOR YOUR ATARI 

Krazy Shoot CXit $32.00 

K-razy Kritters $32.00 

K-razy Antics $32.00 

K-star patrol $32.00 

STICK STAND « 

$099 A: 

ARCADE ACTION FROM 
YOUR ATARI JOYSTICK 




ON-LINE 

Jawbreaker $27.00 

Softporn $27.00 

Wizzard and Princess $29.00 

The Next Step $34.00 

Mission Asteroid $22.00 

Mouskattack $31.00 

SYNAPSE 

File Manager 800 $79.00 

Chicken $28.00 

IDodge Racer $26.00 

Synassembler $30.00 

Page 6 $19.00 

Shamus $26.00 

Protector $26.00 

Nautilus $26.00 

Slime $26.00 

Disk Manager $24.00 



TIMEX 



TIMEX SINCLAIR 1000 



LOWEST 

PRICE 

EVER 



^89 



99 



PEflQOM 



Disk Drives for 
Atari Computers 

Single Drive SI $649.00 

Add-on Drive A1 $349.00 

Dual Drive S2 $899.00 




jj-sa 



MICRO-SCI 

Disk Drives for 
Franklin & Apple II 




MODEMS 



Hayes 

Smart $: 

Chronograph $' 

Microdem II $.' 

Microdem 100 $; 

Novation Auto 

D Cat $■ 

Cat $■ 

Anchor 

Mark I (RS-232) $ 

Mark II (Atari) $ 

Mark III (TI-99) $ 

Mark IV {CBM/PET) $ 

Mark V (OSBORNE) $ 

Mart( VI (IBM-PC) $ 

Mark VII (Auto Answer/Dial) $ 

9 Volt Power Supply $ 



MONITORS 



AMDEK 



300G.. 



. $1 



Color I $; 

Color II $f 

Color III $- 

BMC 

12" Green $ 

13" Color 1400 $i 

13" Color 1401 (Midres) $; 

ZENITH 

ZVM121 ! 

SHARP 
Sharp 13" Cokjr TV 



Maxell Disks 

MD I (Boxot 10) $ 

MO II (Boxot 10) $ 

MFD I (8") $ 

MFD II (8" Double Density) $ 

Syncom (Box of 10) $ 

Computer Covei 

Atari 400 $6.99 Commodore VIC-20.. $ 

Atari 800 $6.99 Commodore 8032 $■ 

Atari 810 $6.99 Commodore 

805(V4040 $• 

COVERS CONTAIN ADVERTISING 



W€St 



8QQ- 648-33 1 1 



In Nevada 

CALL 

(702)588-5654 



P.O. Bo 
Sta 

NV. 



FACEIOOO 





64K Personal Computer 

Hardware, software and 

peripheral compatable with the 
Apple II and even has some fea- 
tures not found on the Apple. 



^/•^ HEWLETT 

HP* 85 
51969 

HP.125 $1969.00 

BP.85 16K Memory Module $ 169.00 

S'A" Dual Master Disc Drive $1799.00 

Hard Disk w/Roppy $4349.00 

Hard Disk $3549.00 

"Sweet Lips" Ptotfer $1199.00 

80 Column Printer $ 649.00 

NEC 

COMPUTERS 

8001-A $74900 

8031 $74900 

8012 $54900 

PRINTERS 

8023 $ 549.00 

nWTTZO $2399.00 

3510'3530 $1599.00 

MONrroRs 

JB-1201 $179.00 

JC-1201 $349.00 

X-1202 $89900 



Televideo 
Terminals 




910 $579 

912C $699 

920C $749 

92SC $749 

950 $950 

^02 $ Call 

802H jCall 

"I? $ Call 

** $ Call 




CBM 8032 

^999 



fr 



PROFESSIONAL SOFTWARE 

Word Pro 5 + $319.00 

Word Pro 4 + $299.00 

Word Pro 3 + _ $199.00 

The Administrator $379.00 

IntoPro Plus $219.00 

Power $ 79.00 



Commodore 

Business Machine^ 

CBM 64 (2ur 

4032 $ 749.00 

8096 Upgrade Kit $ 36900 

Super Pet $1599.00 

2031 $ 369.00 

8250 Double Skied Disk Drive $1699.00 

Dg060 5 Megabyte Hard disk $2399.00 

D909C 7.5 Megabyte Hard disk $2699.00 

8050 $1299.00 

4040 $ 969.00 

8300 (Letter Quality) $1549.00 

8023 $ 599.00 

4022 $ 399.00 

Pet to IEEE Cable $ 37.00 

IEEE to IEEE CAble $ 46.00 

Tractor Feed for 8300 $ 240.00 

New Z-Ram, Adds CP/M and 64K Ram $ 549.00 



Whpt HEWLETT 

mL'nM Packard 

HP 41 CV 
CALCULATOR 

*209 

HP 41C $14900 

HP IOC $ 69.00 

HP lie $ 7900 

HP 12C $1 14.00 

NEW 115C $11900 

NEW 16C $125.00 

HPIL PERIPHERALS IN STOCK! 





SHARP 



PC-1500 

POCKET COMPUTER 



ALSO AVAILABLE: 

Printer w/cassette interface 

cassette tetpe recorder 

and 4K and 8K RAM EXTENSIONS 



In-stock Items shipped same day you 
call. No risk, no deposit on C.O.D. or- 
ders. Pre-paid orders receive free ship- 
ping within the continental United States 
with no waiting period for certified checks 
or money orders. Add 3% (minimum 
$3.00) shipping and handling on all 
C.O.D. and Credit Card orders. NV and 
PA residents add sales tax. All items 
subject to availability and price change. 
NOTE: We stock manufacturer's and 
third party software for most all com- 
puters on the market! Call today for our 
new catalog. 



VIC 20 "—•" 

*179 

VIC 1530 Commodore Datassette $ 69.00 

VIC 1540 Disk Drive $ 339.00 

VIC 1541 {64 Disk Drive) CALL 

VIC 1515 VIC Graphic Printer $339.00 

VIC 1210 3K Memory Expander $ 32.00 

VIC 1110 8K Memory Expander $ 53.00 

16K VIC Expansion $ 94.00 

VIC 1011 RS232C Terminal Interface $ 43.00 

VIC 1112VIC IEEE-488 Interface $ 86.00 

VIC 1211 VIC 20 Super Expander $ 53.00 

VIC Mottier Board $ 99.00 



PRINTERS 

Smith-Corona 






TP-1 

^599 




Call for price and information on the new 
"intelligent" letter quality printer. 

c. rroH (TEC) 

Stanvrltor (F10-40CPS) $1399.00 

Printmaster (F10-55CPS) $1749.00 

Prowritor 80 Col (P) $ 499.00 

Prowriter 80 Col (S) $ 629.00 

PiDwriter 2 (132 Cd) $ 799.00 

OKIDATA 

82A- $ 46900 

83A. $ 68900 

84 Parallel $1099 00 

84 Serial $124900 

— ALSO — 

Talley 8024-L $1629.00 

IDS Prism CALL 



477 E. 
THIRD ST. 
Willlamsport 
PA 17701 



A DDITIO NA L MAN UF ACTUR ER'S DISCOUNTS AVAIL ABLE TO QUALIFIEDEDUCATIONAL INSTITUTIONS 

8QQ-S33-895D 



I 



IN PA 

CALL 

(7171327 9575 



GAMES FEATURE 



Sensible Use of Apple 
Game Paddles 



by Harry L. Pruetz 



Some programming suggestions 
to improve the validity of game- 
paddle inputs. 



Paddle Use 

requires: 

Apple computer with either 
Integer or Applesoft BASIC 
and the Apple game paddles 

when using Apple II game paddles, 
there are both hardware and software 
problems involved. With some knowl- 
edge of inherent limitations, the pad- 
dles can add to the enjoyment of com- 
puter games, both while designing a 
game and playing it. 

My Apple II came with two paddles 
hooked up to the game I/O connector. 
The paddles were actually rotating 
potentiometers, rather than the 
joy stick- type paddles available. Unlike 
two-player games, games designed for 
one player using both paddles for x-y 
control would be better played with a 
real joystick controlling both x and y 
coordinate movements. 

The most obvious limitation on both 
game paddles is the 300-degree physical 
limit on control knob movement. Nu- 
merical values possible from a paddle 
range from at the complete counter- 
clockwise position, up to 255 at the 
complete clockwise position. How- 
ever, these values are available for only 
about a 150-degree rotation of the knob. 

The values read from BASIC using 
the PDL function may be expressed as a 
function of the angle of the paddle knob 
as follows: 



Angle 


Value 


0-29 


— 


30-65 





66-101 


0-63 


102-137 


64-127 


138-173 


128-191 


174-209 


192-255 


210-329 


255 


330-359 


— 



more than half of a degree! Labeling the 
paddles and marking the actual ranges 
are quite helpful for many games. 

The paddle cable that plugs into the 
game I/O connector is a source of prob- 
lems. Each time the paddles are discon- 
nected, cable pins may get bent when 
reconnecting the paddles. The pins 
may be bent back into shape and the 
electrical connection will still be 
sound. However, a simple program to 
sample and display paddle values should 
be run occasionally to make sure the 
paddles are functioning correctly. 

A monitor routine measures a pad- 
dle value by delaying 12 microseconds 
for each unit value measured after the 
paddle is triggered. Thus a value of 255 
takes three milliseconds to measure. 
Times of one to three milliseconds for 
each PDL call are not excessive for In- 
teger or Applesoft BASIC. There are 
usually many other statements exe- 
cuted between PDL calls. Compiled 



BASIC or faster computer languages 
may still use the paddles for game input 
without noticeable effect from the slow 
timing speed. It is usually the machine- 
language implementations of sophisti- 
cated, fast-action games that avoid 
using paddles. 

The program listed is a RAM Apple- 
soft BASIC program to test and demon- 
strate some software techniques useful 
with game paddles. 

Lines 100 through 195 merely sam- 
ple paddle and print a value if it is dif- 
ferent from the previous sample. Line 
110 exits the sampling loop when any 
key is pushed. The paddle may be set to 
any value greater than and less than 
255, and left untouched for a while. 
Because of the sensitivity of the pot and 
the monitor routine which determines 
the value PDL(O), the value often skips 
back and forth between two consecu- 
tive numbers. This causes errors in 
some games that are not the player's 



The value read from a paddle may change 
by 1 when the knob is moved slightly 



Listing 1 


l^f) T^f^ *********************** 


IS RI=M * P^DDLF: W^E OfNOS 


20 RFM * 


25 RFM * W 'KRRY L. PRUKl". 


10 RFM *********************** 


35 DIM XC%(128),YC%(12R) 


40 DEF FM X(D) = 4 * INT ( 1 + Ii^ ( PDL (0) * 68) / 255) 


45 DEF PN.Y(D) = 2 * INT (2 + INT ( PDL (I) * 12) / 255) 


47 (jrvn 95 


50 REM *** •PDL(O) CALC *** 


55 D = ( PDL (0) - 4 * XP) / 4:XP = XP + 3GM (D) * INT ( AB5 (D)):X = I 


1 + 4 * XP: RETURN 


60 REM *** PDL(l) CALC *** 


65 D = (255 - POL (1) - 3 * YP) / 3:YP = YP + Sr?g (D) * INT ( ABS (D) ) 


:Y = 10 + 2 * YP: RETURN 


70 REM *** FRAC PDL(O) C^LC *** 


75 F = 255 / 45:D = ( PDL (0) - F * XP) / F:XP = XP + SGN (D) * TNT ( ARS 


(D)):X = 6 * XP: RETORN 


80 REM *** FRAC PDL( 1) CAIT *** 


85 F = 255 / 45:0 = (255 - PDL (1) - F * YP) / F:YP = YP + SGN (D) * INT 


( ABS (D)):Y = 4 * YP: RETURN 


95 POKE - 16368,0: 'lOME 


100 REM 


101 REM *********************** 


102 REM * PADDLE SAMPLING 


103 REM *********************** 


104 REM 


105 VP = POL (0) 


110 IF PEEK ( - 16334) > 127 TIEN 195 


115 VC = PDL (0) 


120 IF VC < > VP THEN PRINT VC; " "; 


125 VP = VC 


130 UOIXJ 110 (continued) 



66 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



GAMES FEATURE 



PADDLE 1 AVERAGING 



Listing 1 (continued) 

195 POKE - 16368,0: 40t« 

200 RHt 

201 Rm ****************** 

202 REM 

203 RHt 

204 REM 

205 VP = 
210 TF 
215 VC = 
220 IF VC < 
225 VP = VC 
230 GOTO 210 

POKE 
REM 
REM ' 
REM ' 
REM ' 
REM 



295 

300 

301 

302 

303 

304 

305 PC 

310 X ■ 

315 Y -■ 

320 

325 

330 

335 



PDL (1) 
PEEK ( - 16334) > 127 THEM 295 
INT ( INT ( PDL (1) + VP) / 2) 
VP TiEN PRINT VCr" "; 



16368,0: 40ME 



SMOOTH FADING TRAIL 



1:NP = 128 

EN X(0) 

FN Yd) 

I = 1 TO 128:XC%(I) 



FDR 

HGR2 

IF PEEK ( -16334) > 127 THEN 395 

HCOir)R= 0: HPUJT X - 3,Y - 3 TO X + 

3,Y - 3 
340 4PU3T XC%(PC),TC%(PC) 
345 4C0ir)R= 3: HPirJT X,Y 
350 XC%(PC) = X:YC%(PC) = Y 
355 PC = PC + 1: IF PC > NP THEN PC = 1 



X:YC%(I) = Y: NEXT I 



3,Y + 3: HPL3T X - 3,Y + 3 TO X + 



360 X = 
365 Y = 



INT ( iwr (X + 

INT ( INT (Y + 



EN X(0)) 
FN Yd)) 



/ 2) 
/ 2) 



3 TO X + 3,Y + 3: HPLOT X - 3,Y + 3 TO X + 3,Y - 3 



370 4PL3T X - 3,Y 

375 GOTO 330 

395 POKE - 16368,0: 4GME 

400 REM 

401 REM *********************** 

402 REM * DISCREH^ FADING TRAIL 

403 REM *********************** 

404 REM 

405 PC = 1:NP = 128:XP = 0:Y° = 
410 QOSUB 50 

415 QOSUB 60 

1 TO 12a:XC%d) = X:YC%d) = Y: NEXT I 



430 
435 



440 
445 



465 
470 
475 
495 
500 
501 
502 
503 
504 



' 127 THEN 495 
3,Y - 3 TO X + 



3,Y + 3: HPL3T X - 3,Y + 3 TO X + 



tl? ^2^ 

IF PEEK ( - 16334) 

HC003R= 0: HPL3T X - 

3,Y - 3 

HPL3T XC%(PC),YC%(PC) 

HCOir)R= 3: HPL3T X,Y 
450 XC%(PC) = X:YC%(PC) = Y 
455 PC = PC + 1: IF PC > NP THEN PC = 1 
460 QOSUB 50 

QOSUB 60 

HPL3T X - 3,Y - 3 TO X + 3,Y + 3: HPL3T X - 3,Y + 3 TO X + 3,Y - 3 

GOTt) 430 

KKE - 16363,0: TEXT : HOME 

REM 

R£M *********************** 

REM * FRACTIONAL PADDLE INC 
^^ *********************** 

REM 

505 XP = 0:YP = 0: GQSUB 70: QOSUB 80:XC = X:YC = Y 

510 HGR2 : HCOrDR= 2:SW = 

515 FOR I = TO 275 STEP 2 

520 H9UJV 1,0 TO 1,133 
525 NEXT I 

530 HCOrDR= l:P0RI=X+lTOX + 5 STEP 2: HPUTT I,Y TO I,Y + 3: NEXT 

535 IF PEEK ( - 16334) > 127 THEN 595 

540 QOSUB 70: GOSUB 30: IF X = XC AND Y = YC THEN 535 

545 HCOrDR= 0: FOR I = XC + 1 TO XC + 5 STEP 2: HPLOT 1,'K: TO I,YC + 3: NEXT 

550 HC0U3R= 0: HPL3T XC + 2,YC + 1 TO X + 2,Y + 1 

555 HCOIDR= 1: FDR I=X+lTOX+5 STEP 2: HPL3T I ,Y TO I,Y + 3: NEXT 

560 XC = X:YC = Y: GOTO 535 

595 POKE - 16368,0: TEXT : HOME 

999 END 



fault. When the paddle cable is not 
properly plugged into the game I/O 
connector, values may vary even more, 
sometimes changing when the other 
paddle is moved. 

Lines 200 through 295 provide a 
more stable readout from paddle 1. A 
different paddle is used here to allow 
the program to be used for paddle 
checkout. When paddle 1 is not being 
moved, the averaged value VC changes 
only in very rare cases. A disadvantage 
of this averaging method is that the 
range is now only through 254. 
Averaging also slows down the rapidity 
with which VC may change. Paddle 
in the first case can be moved from one 
extreme to the other during only three 
or four samplings. Paddle 1 in this case 
takes about five more samplings for VC 
to catch up to the actual PDL(l) value. 
Line 215 could also be changed to give 
the previous value more weight with 
the penalty of slowing down the sam- 
pling even more. For example: 

215 VC = INT(INT(PDL(1) + 2*VPV3) 

The INT functions required in Apple- 
soft BASIC make the above statement 
more inefficient than when using In- 
teger BASIC. 

Lines 300 through 395 use high- 
resolution graphics to demonstrate pad- 
dle sampling with averaging. XC% and 
YC% are arrays used as circular queues 
to allow display of the last 128 loca- 
tions of the 'X' shape. The functions at 
lines 40 and 45 convert a paddle value 
into X and y coordinates. Again, INT 
functions are required in Applesoft 
BASIC to insure integer arithmetic. 
The numbers in the defined functions 
are fairly easy to obtain by using the 
"slope-intercept form" for straight 
lines. From Analytic Geometry: 
f = a -I- mg, 

where g is the independent variable, 
m is the slope of the line, 
a is the value of f at g = 0, 
and f is the dependent variable. 

We want the paddles to determine 
screen location. Only multiples of 4 are 
used as x-coordinate locations, so the 
figure 'X' may be plotted at 4, 8 , ... , and 
276 without x-3 or x-i-3 causing "il- 
legal quantity" errors. Ignoring the 
multiplier of 4 for now, f should be 1 
when PDL(0)=0, and 69 when 
PDL(0) = 255. For f = a+m*PDL|0), 
a=l and m = (69- l)/(255 -0), so that 
f = l-i-(PDL(0)*68)/255 and x = 4*f. 
Thus we get line 40, where D is an 
unused dummy variable: 

40 DEF FN X(D) = 4*INT(1 -i-INT 
(PDL(0)*68)/255) 
Multiples of 2 are used as 
y-coordinate locations, so the figure 'X' 
may be plotted at 4, 6, ..., and 188 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



67 



GAMES FEATURE 



without y-3 or y + 3 causing "illegal 
quantity" errors. Ignoring the multi- 
plier of 2 for now, f should be 2 when 
PDL(1)=0, and94whenPDL(l)= 255. 
For f = a + m*PDL(l), a = 2, m = 
(94-2)7(255-0), and y = 2*f. Thus 
we get line 45, where D is an unused 
dummy variable: 

45 DEF FN Y(D) = 2*INT(2 + INT 
(PDL(1)*92)/255) 

Line 320 initializes the circular 
queue. The actual loop is lines 330 
through 375. The loop performs the 
following steps: 

1. Erase current 'X'. 

2. Erase last point in trail. 

3. Plot current point in trail. 

4. Save point location in queue. 

5. Adjust queue pointer. 

6. Plot next 'X'. 

Lines 360 and 365 average the x and y 
values obtained from the paddle func- 
tions. The averaging has a smoothing 
effect on movements of the figure 'X' as 
it is moved around on the high- 
resolution grid. 

Lines 400 through 495 demonstrate 
a way of obtaining reliable paddle input 
without averaging. The routine at line 
50 is essentially the same as the one at 
line 60. However, the PDL(OJ routine 
will be explained in detail. Let us con- 
sider the case of PDL(O) = and XP = 0. 



If PDL(O) is increased to 4, then XP 
becomes 1. If PDL(O) changes back to 3 
by itself, there will be no new XP 
because the difference is only 1. Now, 
when PDL(O) is increased to 7, there 
will still be no change in XP. If PDL(O) 
changes to 8 by itself and then back to 7 
again, the value XP = 2 will be calcu- 
lated and will remain in effect until 
PDL(O) is changed to 4 or 12. Thus the 
output of this routine is stable without 
averaging. I have chosen to call the 
method differencing. Note that merely 
dividing PDL(O) by 4 would not give 
stable results. The use of SGN(D)*INT 
(ABS(D)) is used since INT( - 1.1) gives 
- 2 instead of the - 1 desired. 

Note also that 255-PDL(l) is used in 
line 65 rather than just PDL(l). This 
gives the same "intuitive" coordinate 
change for the y-coordinate as paddle 
does for x-coordinate values. Thus, 
clockwise rotation of paddle 1 causes 
movement from the bottom to the top 
of the CRT display. 

The rest of this case is essentially 
the same as lines 300 through 395. 

Finally, we have a demonstration in 
lines 500 through 595 of fractional 
ranges of the paddles. The routines that 
sample the paddles are at lines 70 and 
80. The fraction involved is 255/45 or 
5.66667. This gives a high-resolution 
display of 46 by 46 cells six points wide 
and four points deep. Only 276 of 280 



horizontal, and 184 of 192 vertical 
high-resolution points are used. The 
white cursor is plotted and erased using 
the complimentary color between the 
background lines. Straight black lines 
are drawn between each position of the 
cursor as it is moved using the game 
paddles. 

Fractions much smaller than 
5.66667 may be used in the difference 
calculations for game paddles. I have 
used a fraction as small as 1.275 to get 
200 stable values from a game paddle. 
The values are not exactly "one-to-one" 
for a game paddle. For example, 
PDL(O) = 7 may give a calculated value 
of 5 or 6 depending on the previous 
value. However, the calculated values 
are stable and the game player cannot 
see the difference. 

If you have Integer or Applesoft 
BASIC programs that use game paddles 
and do not give satisfactory results, you 
may consider making a few simple 
changes similar to the given examples. 
Programs that use only a few keys may 
also be changed to use the game pad- 
dles. Above all, sit back and relax. An 
aching back caused by leaning over a 
keyboard is not really necessary. 

Contact the author at 2929 Clydedale, 
#376, Dallas, TX 75220. 

ilMCftO 




mmwm 



For your APPLE II/II+ 



The complete professional software system, that meets 
ALL provisions of the FORTH-79 Standard (adopted Oct. 
1980). Compare the many advanced features of FORTH— 
79 with the FORTH you are now using, or plan to buy! 

FEATURES OURS OTHERS 



79-Standard system gives source portability. YES 
Professionally written tutorial & user manual 200 PG. 

Screen editor with user-definable controls. YES 

Macro-assembler with local labels. YES 

Virtual memory. YES 

Both 13 8i 16-sector format. YES 

Multiple disk drives. YES 

Double-number Standard & String extensions. YES 

Upper/lowercase keyboard input. YES 

LO-Res graphics. YES 

80 column display capability YES 

Z-80 CP/M Ver. 2.x & Northstar also available YES 

Affordable! $99.95 
Low cost enhancement option : 

Hi-Res turtle-graphics. YES 

Floating-point mathematics. YES 
Powerful package with ov/n manual , 
50 functions in all, 
AM951 1 compatible. 

FORTH-79 V.2 (requires 48K & 1 disk drive) 
ENHANCEMENT PACKAGE FOR V.2 

Floating point & Hi-Res turtle-graphics 
COMBINATION PACKAGE 
(CA res. add 6% tax: COD accepted) 



$ 99.95 

$ 49.95 
$139.95 



MicroMotion 

12077 Wilshire Blvd. #.506 
L.A.,CA 90025 (213)821^340 
Specify APPLE. CP/M or Northstar 
Dealer inquiries invited. 




SIG-FORTHVl.O 



The only stand-alone Forth system 
for O.S.I, serial machines 



Features: 

Complete Forth source code 
Advanced Screen editor w/source 
6502 macro assembler w/source 
Double number and CASE extensions 
Vectored boot capability 
Several Utility Screens 
Complete glossary 



Dos Includes: 

Bi-Directional NEC driver 
65U read capability 
NMHZ Capability 



$100.00 

POSTAGE 
PAID 



DIGI COM ENGINEERING , INC. 

P.O. Box 1SS6 
Kodlak, Alaska 99615 

ORDERING INFORMATION: Check, money order orC.O.D.'s accepted. 
Shipment VIA first class mail. Allow approximately one week for delivery. 



68 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



NEW FROM D & N MICRO PRODUCTS, INC. 




MICRO-80 COMPUTER 



Z80A CPU with 4MHz clock and CP/M 2.2 
operating system. 64K of low power static 
RAM. Calendar real time clock. Centronics 
type parallel printer Interface. Serial inter- 
face for terminal communications, dip 
switch baud rates of 150 to 9600. 4 "cooling 
fan with air Intake on back of computer and 
discharge through ventilation in the bot- 
tom. No holes on computer top or side for 
entry of foreign object. Two 8" single or 
double sided floppy disk drives. IBM single 
density 3740 format for 243K of storage on 
each drive. Using double density with 1K 
sectors 608K of storage is available on a 
single sided drive or 1.2 meg on a double 
sided drive. Satin finish extruded 



aluminum with vinyl woodgrain decorative 
finish. 8 slot backplane for expansion. 48 
pin buss Is compatible with most OSI 
boards. Uses all standard IBM format CP/M 
software. 

Model 80-1 200 $2995 

2 8" single sided drives, 1.2 meg of 
storage 
Model 80-2400 $3495 

2 8' double sided drives, 2.4 meg of 

storage 
Option 001 $ 95 

Serial printer port, dip switch baud rate 

settings 



Software available in IBM single density 8" format. 



Microsoft 




Digital Research 


Basic-80 


$289 


PU1-80 


Basic Compiler 


$329 


Mac 


Fortran-80 


$410 


Sid 


Cobol-80 


$574 


Z-Sid 


Macro-80 


$175 


C Baslc-2 


Edit-80 


$105 


Tex 


MuSimp/MuMath 


$224 


DeSpool 


Mu Lisp-80 


$174 


Ashton-Tate 

dBase II 



$459 
$ 85 
$ 78 
$ 95 
$110 
$ 90 
$ 50 

$595 



MIcropro 

Wordstar 
Mail-Merge 
Spellstar 
SuperSort I 
Pascal 
Pascal/MT-i- 
PascalZ 
Pascal M 



$299 
$109 
$175 
$195 

$429 
$349 
$355 



Convert almost any static memory OSI machine to CPIfA® with the D & N-80 CPU Board. 



ZaOA CPU with 4MHz clock. 2716 EPROM 
with monitor and bootstrap loader. RS-232 
serial interface for terminal communica- 
tions or use as a serial printer Interface In a 
VIDEO system. Disk controller is an Intel 
8272 chip to provide single or double densi- 
ty disk format. 243K single density or 608K 
double density of disk storage on a single 
sided 8' drive. A double sided drive pro- 
vides 1.2 meg of storage. DMA used with 
disk controller to unload CPU during block 
transfers from the disk drives. Optional 
Centronics type parallel printer port com- 



plete with 10 ft. cable. Optional Real Time 
Calendar Clock may be set or read using 
'CALL' function In high level languages. 
Power requirements are only 5 volts at 1.4 
amps. Available with WORDSTAR for serial 
terminal systems. 
INCLUDES CPM 2.2 

D & N-80 serial $695 

D & N-80 serial w/Wordstar $870 

D & N-80 video $695 

OptlonOOl $ 80 

parallel printer and real time 

calendar clock 




D & N-80 CPU BOARD 



OTHER OSI COMPATIBLE HARDWARE 



IO-CA10X Serial Printer Port $125 

Compatible with OS-65U and OS-65D soft- 
ware 

I0-CA9 Parallel Printer Port $175 

Centronics standard parallel printer Inter- 
face with 10 ft. flat cable 
BP-580 8 Slot Backplane $ 47 

Assembled 8 slot backplane for OSI 48 pin 
buss 

24MEM-CM9 $380 24MEM-CM9F $530 
16MEM-CM9 $300 16MEM-CM9F $450 
8MEM-CM9 $210 8MEM-CM9F $360 
BMEM-CM9F $ 50 FL470 $180 

24K memory/floppy controJier card sup- 
ports up to 24K of 21 14 memory chips and 
an OSI type floppy disk controller. 
Available fully assembled and tested with 
8, 16, or 24K of memory, with floppy con- 
troller (F). Controller supports 2 drives. 
Needs separated clock and data Inputs. 
Available Bare (BMEM-CM9F) or controller 
only (FL-470). Ideal way to upgrade 
cassette based system 



01 P-EXP Expansion Interface $ 65 

Expansion for CI P 600 or 610 board to the 
OSI 48 pin buss. Requires one slot in 
backplane. Use with BP-580 backplane 
BIO-1 600 Bare 10 card $ 50 

Supports 8K of memory, 2 16 bit parallel 
ports may be used as printer interfaces. 5 
RS-232 serial ports, with manual and Molex 
connectors 

DSKSW Disk Switch $ 29 

Extends life of drive and media. Shuts off 
minifloppy spindle motor when system is 
not accessing the drive. Complete KIT and 
manual 

D & N Micro Products, Inc 

3684 N.Wells St. 

Fort Wayne, Ind. 46808 

(219)48&€414 



TERMS $2.50 shipping, Foreign orders add 15%. 
Indiana residents add 4% sales tax. 



Disk Drives and Cables 
S'ShugartSASOIslngiesided $395 

8 "ShugartSASSI double sided $585 

FLC-66ft.cablefromD&NorOSI $ 69 

controller to 8" disk drive 
SIM'MPIBSI with cable, power $450 

supply and cabinet 
FLC-51/48ft.cableforconnection $ 75 

to 5 1/4 drive and D & N or OSI 

controller, with data separator and 

disk switch 
Okldata MIcrollne Printers 
M L 82A Dot Matrix Printer $534 

1 20 CPS, 80/1 20 columns, 9.5 " paper width, 
friction orpin feed 

ML 83A Same as 82A except $895 

16' paper width, 132/232 columns with 
tractor feed 

ML84 Same as 82A except 200 CPS, $1152 
16" paper width, 132/232 columns, 2K buf- 
fer, dot addressable graphics, with tractor 
feed 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



69 



Ill 



GAMES FEATURE 



Space Invasion 
for OSI C I P/Superboard 



by John S. Seybold 



Space Invasion 

requires: 

OSI C1P or Superboard 

In this real-time arcade game you must 
fight waves of incoming aliens. Each 
time you clear the screen of aliens it 
refills with more aliens, faster and 
closer than the last bunch. The more 
times you clear the screen, the more 
points each alien is worth. 

The aliens are moved by the user 
routine; their addresses are updated in 
line 2510. Z tells the routine which 
way to move the aliens. To adjust the 
pace of the game, you may adjust line 
2082 or line 2520. If you remove all of 
the REM statements, the program 
should run in 4K of memory. 



Mr. Seybold is employed by General 
Dynamics in Pomona, CA. He has owned 
an OSI Superboard for a year and a half. 
Address correspondence to 3210 Quartz 
Lane, #A-10, Fullerton, CA 92631. 




Space Invasion 



2 DIMfl< 49 ■; ' W=53366 • WW=W-17 ' R2=75e ' X=54214 ' y=54235 

5 REM-RDJUST LINES 2526 RHD 2062 FOR SPEED. ROD SOUND TO 639,7900 

1 GOSIJB209 ■ POKE 1 1 .. 34 ^ POKE 12,2' .50=0 

20 HS*="HIGH SCORE" iPRINT" SPACE INVASION" 

40 PRINT" " :GOSUB290-V=3£'KB=5708giri=251 

50 PRINT"C > RIGHT" !pRINT"X > LEFT" ^ PR INT" M > FIRE" 'PRINT 

80 PRINT : INPUT"DIFFICULTV LEVEL C 1-5 ';" ; D ■■ IF'; D< 1 JOR''. D>5 )THEN80 

100 PRINT"HIT 'M' TO START" : POKE530. 1 ' POKEKB.. M 

110 IFPEEK.';KB)=MTHEN910 

120 GOTOUe 

290 FGRK=1T012 ' PRINT ■■ NEXT : RETURN 

400 REM-TIJRRET FIRE ROUTINE********** 

416 TM=P-V ■■ IFPEEKC TM X >RflTHENPOKETM, 39 ' RETURN 

420 POKETM , V ' RM=RM- 1 ' TM=0 ' SC=SC+ 1 ■■ RETURN 

SO0 REM-TURRET FIRE UPDATE ROUTINE*** 

6 1 .J=PEEK<: TM > : I F.J= AATHENTt1=0 ■■ RETURN 

620 POKETM , V ■ TM=Tri-V ■■ IFTM<fl< B )THENTM=9 ■■ RETURN 

625 I FTM=AFTHENTM=«0' RETURN 

630 .J=PEEK<: TM ■; ' I F J=VTHENPOKETM . 39 • RETURN 

640 POKETM , V ■ TM=0 ' I F J< >flATHENRETURN 

650 RM=RM-1 ■■ SC=SC+ie ' SCt=STR*'; SO ■'' ■■ FORK=1TOLEN': SCt ) 

6S0 POKEW+K;flSCCMID«<SC*.. K, 1 ) ) ' NEXTK ' IFSC<HSTHENRETURN 

670 HS=SCiREM-HIGH SCORE PRINT ROUTINE***** 

630 F0RK=1T0LEHCHS«+STR*<;H3)) 

690 POKEWW+K, ASCC M I D*f. HSS+STRJC HS 'J , K , 1 ) ) ' NE!<TK ■■ RETURN 

700 REM-ALIEN FIRE UPDATE ROUTINE**** 

710 POKEAF ,, V ■■ RF=RF+V ■■ J=PEEK'; RF ) ■ IFf. .J=AA ';0R<; RF>P ';THENRF=Q ■■ RETURN 

720 IF J=CVTHENFOKEAF , V ■■ flF=0 -■ RETURN 

730 POKEAF, 39 : RETURN 

900 REM-SET UP SCREEN************************* 

910 F0RK=1T025 ■■ PRINT ■■ NEf^lT ■■ P0KE54149.. V ' 2=54087 ■■ CV=161 

920 FORK= 1 T04 ' POKEZ .. CV > POKEZ+ 1 , CV ' POKEZ+V , CV 

930 POKEZ+33/ CV ■■ P0KE2-V, CV ■■ P0KE2-31 .. CV : 2=2+5 ■ NEXTK ■■ P=54224 ■ BB=49 

1000 e=l ■■ RF=0 1 TM=0 ■ RM=BB ■■ C=1.9 ' 2=1 ' RA=231 ■ TURRET=236 

1010 CL=7 ' FORK=1TOCL ■ READfliC K :> ■ fl< K ■J=A''s K )+V*D ■■ POKERi; K ) , AA 

1020 FORI=KTOBBSTEPCL' IFI=KTHENNEXTI 

1030 AC I ')=»<. I-CL )+2*V ■■ POKEA< I ).. RA ' NEXTI ■■ HE><;TK ■■ POKEP.. TU ■ GOSUB6S0 

1940 F0RI=54ST0623 ' READ J ' POKEI .. J ■■ NEXT I 

2000 REM-MOVE ALIENS? PROGRAM LOOP********************************: 

20 1 C=C- 1 ■■ I FPEEK< flC B ) ;'=VTHEHB=B+ 1 

2030 I FPEEK'; AC BB i! )=VTHENBB=BB- 1 

2062 :FC=>0THENFORK=1TOC 60-5*0 > ■■ NEXTK ' GOTO4020 

2083 IFRTHEH2590 

2035 IFZ<0THEN2100 

2090 FORK=YTOR< B JSTEP-V ■ IFPEEKC K ■;=AATHEN2=V-2 ' R=l ' GOTO4020 

2095 NEXTK. ■ GOTO2500 

2100 FORK=XTOflC B 'JSTEP-V ■■ IFPEEKC K >=AATHEN2=V-Z ' R=l ' GOTO4020 

2110 NEXTK 

2500 I F2 >0THENPOKEA2 .. 2 ' G0T025 1 

2505 POKERZ/ 256+2 

2510 X^USRC X > ■■ FORK=BTOBB •• AC K 5=R(; K >+Z - NEXTK ■ IFRC EB :)=>XTHEH7900 



70 



MICRO - The 6502/6809 Journal 



No. 54 - November 



GAMES FEATURE 



Space Invasion (continued) 

2520 R=ei ' C= . Z+(. Rti'-S M FFlBS';. 2 )<> 1 THEN2=2-V 

4030 REM-CHECK FOP. TURRET FIRE****** 

4020 J=PEEt«'. KB •; ' I FC f. JORM )=n ■;flNDTM=aTHENa03UB4 1 

4490 REM-CHECK FOR TURRET MOVEMENT** 

4500 IFC JCIR191 X>191THEN4600 

4520 IFP< >YTHEN ' POKEP.. V ■■ P=P+1 ■■ POKEP; TU ■■ GOTO500e 

4600 IFCJOR1,27K>127THEN5000 

4S 1 I FF< >XTHEN • POKEP .. V ^ P=P- 1 ■ POKEP .. TU 

4590 REM-RLIEN FIRE***************** 

5000 IFRF< >0THEHGOSUB710 ■ GOTO5100 

5910 RL=BE-IHT';5*RHD<3;0^ IFRL<BTHENflL-BB 

5040 I FPEEK< ft<. RL ) )=fll=lTHENRF=R'; RL HV ' POKERF.. 39 

5100 IFFlF=PTHEN7909 

5200 IFTMTHEHG0SUB6ie^ IFRM<=0TH,EN9000 

5210 GOTOSeie 

7390 REM-TURRET DESTROYED******************************************** 

7900 FOR I = 1 TG2C-ie ^ POKEP .. 2 ^ POKEP , 3 

7920 POKEP . 232 ' POKEP . 233 ^ POKEP , 32 ■■ NEXT ■■ GOSUBSaa 

7953 PR I HT" THE ALIENS HRVE" 'PRINT 'PR I NT "OVERCOME YOUR DEFENSES" 

7969 PRINT ^PRINT"FIND LANDED !!"' GOSUB200 

7963 PR I NT "YOUR SCORE WAS"/ SC ' PRINT 

79S0 FORK=lTO8'POKEW+K..ViNEXTK'FORI»lTO3000'NE!<TI 

S009 FORK=XTOY ■■ POKEK. V ' NEXT •■ POKE530; 

3023 GOSUB200' PRINT" SPACE INVADERS" 'GOSUB200 

3925 INPUT "PLAY AGAIN" ;K*^ IFLEFTtCKS, 1 )="Y"THENRESTORE ' GOTOIS 

8030 FORK>=WWTO Y ' POKEK , V ' NEXTK ' END 

3990 REM-NEXT SCREEN***************** 

9000 RESTORE' IFD<7THEN0=D+1 

9010 FORK=XTOY ' POKEK.. V ' NEXT ' IFTM< >0THENPOKETM.. V 

9045 IFRFOSTHEHPOKEAF/'/ 

9050 POKEP.. V'GOTOS 10 

19000 DATA 53354.53356,. 5335S.. 5.3360 ..53362. 53364. 53366 

10010 DATA 216.. 169.211. 133.217. 169.0. 133.216. 160.255. 177.216.201.231 

10020 DATA 203. 3. 32. 66. 2. 136. 208.. 244. 198.217. 169.207. 137. 217. 2er8. 234 

10030 DATA 96.. 169. 32. 145. 216,. 152. 72. 174. 238, 2, 43.27^24, 109.238.2, 16S 

10040 DATA 176.8. 169.231. 145.216. 104. 168. 136.36.230.217. 163.231. 145 

10050 DATA 216. 198.217. 104. 168.136.96.24.109.238.2.169.24.144.228 

jycfto- 



pon 



>t Forge*' 



Visit 



IMCftO 

at the 

Northeast 
Computer Show 

Nov. 11-14, 1982 

Hynes Auditorium 
Boston, Massachusetts 

Booth #406 

We look forward to meeting you! 



^z'* VANTEC 80 

The COMPLETE 80 COLUMN VIDEO Board 

with HIGH RESOLUTION GRAPHICS 

CAPABILITY for your APPLE. 

At last ... a complete video board for your Apple II or Apple 
11+ microcomputer. No longer are "Soft Switches, Lower 
case Eproms" and low quality graphics necessary. By 
mixing the 80 column video directly onto the normal video 
output, either high resolution graphics, low resolution 
graphics or 40 column text may be combined with the 
80 column display. 
Save $90 on Introductory Special. . . . (List $389). . . . $299* 

RC Electronics Inc. 

7265 Tuolunnne Drive, Goleta, CA 931 1 7 
(805)968-6614 

Dealer Inquiries Invited 




• The VANTEC 80 is the only board that can overlay an 80 
character display on the normal Apple video. 

• Software switching between 80 & 40 character displays. 

• Mix High Res or Lo Res graphics with the 80 character 
text display. 

• Upper and lowercase characters with shift mod provided. 

• Flashing or inverted block video cursor. 

• Apple-soft, Apple Pascal and Z80 Softcard* compatable. 

•Special Introductory Pricing available for systems purchased betore Nov, 30, 
1982, Credit card orders add 3%, California orders add 6% sales tax. 



No. ^4 - November 1982 



MICRO - The 6502/6809 Journal 



71 



GAMES FEATURE 



Apple Shootdown 



by Eric Grammer 



A type and RUN low-resolution 
graphics game. 

Shoot Down 

requires: 

Apple II with Applesoft and 
game paddles 

Here is a simple game with a short 
machine-language sound program. The 
oject of the game is to shoot at all the 
columns with dots in them. The dots 
will fire back at you. To move your ship, 
use paddle (OJ . To fire, press the button. 
The machine-language section 
should be BSAVEd with A$300, L$30. 
The lo-res graphics listing is straight- 
forward and is fairly self-explanatory. 
Good shooting! 



Assem 


bier Listing I 

1 

2 

3 


.aser Fire 




* 
* 


lASER FIRE 








5 
6 
7 
8 


* 
* 


ERIC GRW«ER 






IWWW »»»■■■■■■■■■■■■■■■■■■ 

ORG $300 








9 


.««««««.«««« 1 








10 


REPEAT 


EPZ $06 








11 t 


JSRRPT 


EPZ $07 








12 1 


fICOP 


BQU $330 








13 5 


OOOP 


BQU $331 








14 


3PKR 


BQU $C030 








15 


""""""""""" 1 








16 


TIW^: 




0300 A9 


00 




17 




inA #$00 


0302 85 


06 




18 




Sm REPEAT 


0304 A5 


06 




19 


rrip 


inA REPEAT 


0306 C5 


07 




20 




CMP USRRPT 


0308 FO 


08 




21 




BBO END 


030A E6 06 




22 




ItC REPEAT 


030C 20 


13 


03 


23 




JSR FIRE 


030F 4C 


04 


03 


24 




JMP rnop 


0312 60 






25 


END 


RIS 


0313 A2 


00 




26 


FIRE 


UK #$00 


0315 AO 


00 




27 


tCiZM. 


XJX fSOO 


0317 AD 


30 


CO 


28 




lUA SPKR 


031A C8 






29 


DELM 


IWf 


031B 98 






30 




TfA 


03 IC BE 


30 


03 


31 




STX YKJDP 


031F CD 


30 


03 


32 




CMP YKJDP 


0322 30 


F6 




33 




EMI neiAY 


0324 E8 






34 




INX 


0325 8E 


31 


03 


35 




STX XMOP 


0328 A9 


FF 




36 




LDA #$FF 


03 2A CD 


31 


03 


37 




CMP XD30P 


032D DO E6 




38 




are; tcibar 


032F 60 






39 




RTS 


0330 






40 




BID 



The author may be contacted at 95 Old 
Street Road, Peterborough, NH 03458. 



Listing 1: Shoot Down Applesoft Listing 



10 PRIOT : PRIWr <HRS (4)"BIOAD lASER FIRE.OBJ" 

20 TEXT ! HCME : PRIWT "SIOOT DOWN" 

25 DIM V(40) 

30 PRIMT : PRIW "WiAT'S TOUR SKIli LEVEL?" 

40 PRIMT : PRIMT "1. SIMPI£TON" 

50 PRIMT "2. PAIR" 

60 PRIMT "3. 0000" 

70 PRIW "4. EJSaUANT" 

80 PRINT "5. MR. PERFECT" 

90 PRINT : PRIWT "PLEASE PRESS THE NUMBER OF TOUR CHOICE:"; 

100 GET SKS: IP VAL (SKS) < 1 OR VAL (SK$) > 5 THHN 100 

110 SKIU, = VAL (SKS) 

120 VIRB SKILi, + 4: FIA31 : HTAB 1: PRIWr SKI Li,; ! NORMAL 

130 VTRB 20: PRINT "PRESS ANY KBf TO BEGIN... ";: GET AS 

140 POKE 7,1 

160 TBCT : HOME 

170 GR : O0IDR» 1 

180 X = DTT ( PDL (0) / 7.3): OOSUB 380 

190 FOR X = 1 TO 21 STEP 4: FOR Y = 3 TO 35 STEP 4: PLOT Y,X: NEW Y,X 

200 &>I£W= 5 

210 PDR X = 3 TO 19 STEP 4: FOR Y = 5 TO 33 STEP 4: PlOrf Y,X: NEXT Y,X 

220 SilPS = 6 - SKIli 

225 HOME : VTAB 24; PRIMT SilPS" 91IP";: IF SlIPS = 1 TIEN PRIMT " LEFT 
1": OOriD 230 

227 PRIMT "S UEFT" 

230 IP IMT ( RND (1) * (7 - SKIli)) = 1 THEN QDSUB 440 

240 X = IMT ( PDL (0) / 7.3): IP B < > X THEN OOSUB 380 

250 IP PEEK ( - 162S7) > 127 THEN CALL 768: Q3SUB 280: GOTO 230 

260 IP IMT ( WTO (1) * (7 - SKIIi) ) = 1 THEN OOSUB 440 

270 (rrro 230 

280 OOUDR- 15:C =■ X 

290 EDR I = 34 TO STEP - 2 

300 X = INT ( PM. (0) / 7.3): IF X < > B THEN OOSUB 380 

310 FOR L = 1 TO 20: NEXT 

320 O0I£IR» 15: VliIN I,I + 2ATC + 2 

330 CaUX^ 0: P1X3T C + 2,1 

340 PUTT C + 2,1 + i: PLOT C + 2,1 + 2 

350 NEJCT I 

360 V(C + 2) = 1 

366 O0I£»= 14: VliIN 35,37 AT B + 2 

370 RETURN 

380 O0tDR= 0; HLIN B,B + 4 AT 39; HUN B,B + 4 AT 38; HLIN B + 1,B + 3 AT 

37 
390 VUN 35,37 AT B + 2 
400 B =■ X 
410 O0inR= 14: HLIN B,B + 4 AT 39: HLIN B,B + 4 AT 38: HLIN B + 1,B + 3 AT 

37 
420 VUN 35,37 AT B + 2 
430 REmjHN 

440 IP TOT ( RND (1) * 2) = 1 THEN 460 
450 Yl = IMT ( WTO (1) * 6) * 4 + 1:X1 = INT ( RND (1) ♦ 9) * 4 + 3: GOTO 

470 
460 Yl = TOT ( »ID (1) * 5) * 4 + 3;X1 = INT ( B»JD (1) ♦ 8 + 1) * 4 + 1 

470 Yl = Yl +1: IF V(X1) = THEN 490 

480 crmo 860 

490 OOIfll^ 15 

500 CALL 768: CAU, 768 

510 EDR L = Yl TO 38 - SKIIi. STEP SKILL: VLIN L.L + SKILL AT XI 

520 X = INT ( PDL (0) / 7.3): IF B < > X THEN OOSUB 380 

530 NEXT 

540 OOIOR- 

550 FOR L = Yl TO 34 STEP 3: VliIN L,L + 4 AT XI: NEXT 

560 IF SCm( Xl,39) < > THEN 590 

570 O0Ii3R= 0: VLIN Yl,39 AT XI 



580 OC = 0: RETURN 



(contirA 



72 



MICRO - The 6502/6809 Journal 



No. 54 - November 



GAMES FEATURE! 



Listing 1 (continued) 



590 
595 
600 
610 
620 
630 
640 
650 
655 

660 
670 
680 

690 



COLDR= 15 

HCME 

TOR A = 35 TO 39: HUN X,X + 4 AT A: NEXT 

CnLDR= 0: HUN X,X + 4 AT 35: CALL 768 

HUN X,X + 4 AT 36: CALL 768 

4 AT 37: CALL 768 

4 AT 38: CALL 768 
HUN X,X + 4 AT 39: CALL 768 

IF SHIPS > 1 THEN PHNT "PRESS ANY KEif TOR NEOT SHIP "; : GET A$:SHI 
PS = 91IPS - 1:X = INT ( PDL (0) / 7.3): OOSUB 380: 0010 225 
IF X < 5 IHtN X = 5 
IF X > 32 THEN X = 32 
TOR V = 20 TO 23: VTAB V: HTAB X: PRINT "GAME";: CAIi 768: HTAB X: PRINT 

" ; : NEOT V 
TOR L = 1 TO 4: VTAB 24: HTAB X - L: PRINT "GAME "; : CALL 768: NEXT 



HLTN X,X 
HLIN X,X 



700 TOR V = 20 TO 23: VTAB V: HTAB X: PRINT "CWER";: CALL 768: HTAB X: PRINT 

" ; : NEOT V 
710 FOR L = TO 3: VTAB 24: HTAB X + L: PRIfTT " CWER";: CALi, 768: NEXT 

720 PRIMT : PRItW 

730 PRIWT "CARE TOR ANOTHER GA^E? (Y/N) : "; 

740 GFT G5: IF G$ = "N" THEN 770 

750 IF G? = "Y" THEN CLEAR : GOTO 20 

760 GCro 740 

770 HOME : TEXT 

780 1 = 

790 I = I + 1: VBkB I 

800 FOR A = 39 TO 1 STEP - 1: HTAB A: PRltW ">"; : HTAB A: PRINT " "; : NEW 

A 
810 1=1+1: VTAB I 

820 FOR A = 1 TO 39: HTAB A: PRIMT "<";: HTAB A: PRIt^ " ";: NEXT A 
830 IF I < 20 THEN 790 
840 VTAB 1: EDR I = 1 TO 20: VTAB I: HTAB 40: PRINT ;: VTAB I: HTAB 4 

0: EDR A = 1 TO 5: NEXT A: PRItW " "; : NEXT I 
850 HOME : END 

860 FOR CO = 3 TO 35 STEP 2: IF VCCO) = THEN CC = 1: 0010 440 
870 X = lOT ( PDL (0) / 7.3): IF B < > X THEN OOSUB 380 
880 NEXT CD 

890 CAli 768: CALL 763: CALL 768: PRINT "YOU WINl" 
900 Q3TO 720 



4MCRO 



JJnkrpHting §nftujarf ^ 



preeanta 



OSI C4P-MF SOFTWARE 




(fnrat 



THE nOST EXTENSIVE DiO ADVENTIJRE/F4NTASY 
FOR THE OSI ' YOU MUST TRAVEL THROUGK 
THE EVIL LANDS OF ISIERON. FIGHTINO ANO 
KILLING MCiNSTERS AND HAOIC-USERS EVERY 
STEP OF THE U*Y: YOUR OOAL IS TO SEEK 
our CERTAIN TREASURES THAT UILL ALLOW 
YCJ TO FREE THE LAND FROM THE EVIL CHAIN 
OF MAGIC CASTLES! COMPLETE WITH FULL 
ORAPHICS DISPLAY. COLOR AND SOUND! 

INCLUDES A COnPREHENSIVE nANUAL. ALL 
THIS FOR ONLY 129.93 



SEND TOi SEND •! FOR OUR 

INTERESTING SOFTWARE CATALOG OF THE 

21101 S. HARVARD BLVD. FINEST 0SI-C4P 

TORRANCE. CA 90S01 riF SOFTWARE... 





USERS! 



READ . . . 




The Unofficial OSI Users Journal 



THE WORLD WIDE PUBLICATION 
EXCLUSIVELY DEDICATED TO OSI USERS! 

n Hardware Mods. D Peeks and Pokes D Bugs and Fixes 

D Software Exchange D Software Reviews 

SEND $15.00 FOR 12 ISSUES TO: 

PEEK (65) P.O. BOX 347, OWINGS MILLS, MD 21117 (301)363-3267 



Maryland Subscribers Add 5% Tax 



Inquire for Foreign Rates 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



73 



Skyles Electric Works Presents 




The VicTree™ 



. ..Leaves your new Vic (or CBM 64) with 35 additional commands. 
. ..Branches out to most BASIC 4.0 programs. 
. . . Roots into most printers. 

New from Skyles: the VicTree, a coordinated hardware and software package that allows your Vic 
to branch out in unbelievable directions and makes it easier than ever to do BASIC programmin( 
debugging and to access your disk. And the new VicTree provides routines to interface the Vic tc 
the powerful ProMet local network. 8kb of ROM — 4kb for the BASIC commands, 4kb for disk 
commands and interfacing to ProNet — plus 4kb of RAM for miscellaneous storage. Perfect not 
only for the new Vic but also for the Commodore 64. Unbelievably simple to use and to install, tt 
VicTree gives you all the additional BASIC 4.0 commands to allow most BASIC 4.0 programs to 
work on your new Vic or CBM 64. 

Now only $89. 95... or $99.95 complete with Centronics standard printer cable. (Cable alone 
$ 19.95.) Available now from your local dealer or order through your Visa or MasterCard toll free 

(800) 227-9998 (California, Canada, Alaska, Hawaii: (415) 965-1735) or send check o 

money order directly to: 




Skyles Electric Works 



231 E South Whisman Road 
Mountain View, CA 94041 
(415)965-1735 



74 



MICRO - The 6502/6809 Journal 



No. 54 - November 



/MCRO 



PET Vet 



By Loren Wright 



What to Do with 96K — 

Two Word Processor Approaches 

For the designers of Wordcraft Ultra 
and WordPro 5 Plus, it must have been 
a pleasant dilemma. Steve Punter and 
Pro-Micro Software had their popular 
WordPro 4 Plus to upgrade, while P.L. 
Dowson and DataView had the sleek 
Wordcraft 80 to work with. It is only 
logical that the extra memory provide 
more room for text, but it is what else 
has been added to the programs that 
makes them so interesting. 

This column is devoted to a discus- 
sion of these two word-processing pro- 
grams for the CBM 8096. Because these 
versions retain all the features of their 
predecessors, my discussion should be 
of use to people with 8032s, as well as 
to those with 8096s. A future PET Vet 
column will cover word processors for 
the 40-column PETs. 

Wordcraft Ultra will run on an 
8096, an 8032, or an 8032 expanded 
with Madison Computer's ZRAM 
board. WordPro 5 Plus is designed 
specifically for the 8096; it will not 
work with the 8032. Wordcraft versions 
require a special "data key" (formerly 
known as a "dongle"), while WordPro 
versions require a functional ROM in 
the $A000 socket. 

I will start with a general discussion 
of the two word processor families. Ex- 
cept where otherwise noted, Wordcraft 
refers to all the Ultra configurations 
and Wordcraft 80, while WordPro refers 
to WordPro 4 Plus and WordPro 5 Plus. 
I will also discuss the extra enhance- 
ments in the new versions. 

The "Flavor" of WordPro 

WordPro essentially presents you 
with a continuous scroll of 80-charac- 
ter lines on which to type. You start in 
the upper left-hand comer and keep 
typing until you're done. Words get 
split, but (not to worry) they will be 
kept together at output time. This, 
coupled with there being only two 
status lines, allows a lot of text to be 
viewed at once. Margins, centering, jus- 
tification, paging, line spacing, and 
several other features are handled at out- 
put time. These are specified in the text 



on special, non- printing format lines. 

If you're working with elaborate 
tables or a particularly fancy text, the 
continuous nature of the text and the 
distracting format lines make it dif- 
ficult to visualize what the result will 
look like. There is a special output-to- 
video command that will show you the 
results on the screen, without wasting 
paper, but editing must still be done on 
the original, continuous version, and 
this is time consuming. 

WordPro has a special feature called 
"Extra Text," which may be used to 
hold other text files, disk directories, 
commonly used phrases and paragraphs, 
or files of names and addresses for fill- 
ing form letters. In WordPro 5 Plus 
there are four such extra text areas. 
WordPros 3 and 4 have only one, but 
the relative sizes of the extra and main 
text areas can be apportioned differently 
for different needs. I used WordPro 5 
Plus to write this column, primarily 
because of the "append characters" 
function. I stashed the names WordPro, 
WordPro 5 Plus, Wordcraft, and Word- 
craft Ultra in extra memory, so that 
with only a few keystrokes I could copy 
those characters at the current cursor 
position. Whole paragraphs are handled 
in a similar manner. The extra text also 
makes it possible to have a whole file of 
names and addresses in memory at the 
same time as the target form letter. 

The "Flavor" of Wordcraft 

If you've used a big, dedicated word 
processor, you will be more comfort- 
able with Wordcraft. With a few excep- 
tions, what you see on the screen is 
what you get on paper. You can tell 
how lines will look before they are 
printed. Even documents wider than 80 
columns can be handled. The screen is 
a window that can be panned across the 
text. If a really long word has been 
moved to the next line, leaving the 
previous one too short, you can easily 
tell where to insert a soft hyphen to 
even up the line lengths. Most format 
commands are indicated by the presence 
of reverse field on a text character, but 
they don't take up space on the screen. 
Instead of giving you a continuous scroll 
of lines, Wordcraft gives you a certain 
number of characters to work with. It 
forces new pages as needed according to 
your page-length specifications. 



One powerful feature of Wordcraft 
is the ruler, which indicates the posi- 
tions of your margins and tab stops. Its 
current contents are shown on the bot- 
tom status line (of five). The ruler may 
be changed at any time. If you're trying 
to get a table to look just right, you can 
try out one arrangement of tab stops, 
type in your text with tab characters at 
the right points, and then go back and 
readjust your ruler without reentering 
the text or the tab characters. The text 
will automatically line up at the new 
tab stops as soon as you finish changing 
the ruler. 

A Comparison of WordPro 
and Wordcraft 

Now that I have discussed the 
special features of Wordcraft and Word- 
Pro, I can compare them on what they 
have in common. Most word processors 
perform the following functions in some 
way. Some do them better than others. 

Entry of Text: Both programs do a 
good job here. You can continue typing 
without worrying about the way words 
carry over to the next line. WordPro 
uses a simple carriage return to force a 
new line and the tab key to advance to 
the next tab stop. With Wordcraft, 
these must be preceded by the control 
key. The Commodore business key- 
board, with its full cursor control, is 
well-suited to word processing. 

Editing of Text: Both WordPro and 
Wordcraft have commands for deleting, 
inserting, transferring, and duplicating 
text. In general, Wordcraft 's commands 
are more powerful, making cut-and- 
paste operations very easy. WordPro's 
delete, transfer, and duplicate com- 
mands have restrictions, which can be 
circumvented by inserting and deleting 
spaces. Insert mode with WordPro is 
more convenient. 

Search and Search-and-Replace: 
Neither program excels at these func- 
tions. WordPro's command structure is 
complicated. The search-and-replace 
command is an all-or-nothing proposi- 
tion. The search command finds the 
next occunence of the search string, 
but requires a different command se- 
quence to continue searching for the 
same string. Both commands can act 
globally or just on the current file, and 
there is an option to ignore case. Word- 
craft's commands make more sense, but 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



75 



PET Vet 



(continued) 



there is no global option and delimiters 
|an artifact from line editors) are re- 
quired around the search string. Both pro- 
grams use the '?' as a "wild" character. 

File Maintenance: WordPro makes 
this easy. It is possible to recall files 
using a few characters and an asterisk 
(the same as with other PET files). 
Also, file names can be read directly 
from the text area of the screen, such as 
from a comment line or directory 
listing. It is also possible to get a selec- 
tive directory listing. When you have 
specified a file name that already ex- 
ists, WordPro asks you if you want to 
replace it. Wordcraft, with its chapter 
organization and optional descriptive 
names and dates, makes documenta- 
tion of the contents of a disk much 
more complete. However, saving and 
loading files is more cumbersome. Full 
file names must be typed in. 

Support of Piinteis: WordPro fully 
supports a limited number of printers. 
It was designed specifically with the 
NEC Spinwriters in mind, and the com- 
bination works very well. The Diablo 
630, Qume Sprint 5, CBM 8027, TEC 
1500, and dot matrix types, are sup- 
ported as well. However, other printers 
may not be fully supported. Wordcraft 
comes with a long list of printer data 
files, each matched to a particular 
printer/print wheel combination, on 



the master disk. The Wordcraft dealer 
can obtain a PDF from the distributor 
for just about any printer that runs off 
the IEEE. Wordcraft Ultra has special 
features for supporting printers with 
proportional spacing print wheels. 

Generation of Foim Letters: Word- 
craft's handling of these is more power- 
ful. The fields in the letter have unique 
identifiers, so that the same piece of in- 
formation from the fill file may be re- 
used. This avoids a lot of extra typing 
when you construct the fill file. How- 
ever, the fill file must be used from the 
disk, and while entries may be used 
selectively, it is difficult to remember 
which page numbers go with which en- 
tries in the file. This makes editing dif- 
ficult. WordPro, with its extra memory 
feature, allows the fill file and the form 
letter to be in memory at the same time, 
making editing much easier. Blanks in 
the form letter are filled sequentially, 
so if the same item has to be reused in 
the letter it must appear twice in the 
fill file. Selective use of entries from 
the fill file is also more difficult. 

Handling of Long Files: WordPro 
has a chaining feature that allows a 
document to extend beyond the capaci- 
ty of the computer. Print, search, 
search-and-replace, copy, and output- 
to-video commands can all be specified 
with global options. A global command 
will operate not only on the file in 



memory, but also on all the files linked 
to it and stored on disk. 

Wordcraft, instead of chaining files, 
uses a "chapter" organization. To con- 
tinue a file, save the first as chapter 1, 
then assign the continuation to chapter 
2 of the same file. Files may be printed 
out globally, or by specifying a certain 
range of chapter nupibers. Also, in- 
dividual pages may be selected. How- 
ever, commands such as search, search- 
and-replace, and copy act only on the 
chapter in memory. 

What's Been Added? 

Wordcraft' s text size has been 
approximately doubled, from about 
11,000 characters in Wordcraft 80 to 
over 20,000 in Wordcraft Ultra. Word- 
craft 80 requires the master disk to be 
present in one drive, since the editor 
and print module could not reside in 
memory at the same time. With Word- 
craft Ultra the entire program resides in 
memory at one time, leaving both 
drives available for file operations. 
(The 8032 configuration requires a 
ROM, which contains program mod- 
ules.) Wordcraft Ultra adds a set of 
escape codes that provide such capabili- 
ties as selective double-spacing and 
centering or right alignment of a series 
of lines. Other escape codes handle 

(continued) 



UPGRADE YOUR AIM-65* INSTANTLY 



'A trademark of Rockwell Inc. 



To A 6809 Development System 

With The 
"MACH-9 

From 

M M S Inc. 




INTRODUCTORY PRICE 

$239. 

Plus $6 U.P.S. 
And Handling 

Includes: 

*6809 CPU Plug-in Assembly 
*Super-set of AIM Monitor 
*Two-Pass Symbolic Assembler 
'Complete Monitor Source Listings 
'Enhanced Cut & Paste Editor 
*200 Page Manual 
*Full I/O Control 



"MACH-9" is assembled and tested with 
local BUS, 5 locking low force ROM sockets 
and 2K Static RAM 



M M S Inc. 

1110 E. Pennsylvania St. 

Tucson, AZ 85714 

(602) 746-0418 




WS4- 



76 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



PET Vet 



(continued) 



pitch, vertical spacing, horizontal spac- 
ing, and proportional spacing. Unfor- 
tunately, these non-printing characters 
occupy space on the screen, making it a 
less accurate representation of what 
will be printed. Also added is support of 
Canadian Micro Distributing' s MUPET 
multiple-user system. Wordcraft Ultra 
also has its own built-in multiple user 
system. Another big improvement is 
the provision to handle proportional 
spacing print wheels. The price of 
Wordcraft 80 is $395, while that of 
Wordcraft Ultra is $545. 

WordPro 5 Plus includes the main 
and four extra text areas, each contain- 
ing 169 80-character lines. Therefore, 
the maximum length of a single file in 
memory has not increased from Word- 
Pro 4 Plus to WordPro 5 Plus, but then 
neither has the price (both $450). 
WordPro 5 Plus has added support of 
the MUPET system, as well. I have just 
barely begun to explore the possible 
uses of the extra text areas. 



Conclusions 

With the possible exception of the 
IBM PC, the CBM 8032/8096 has the 
best keyboard for microcomputer 
business applications. Easy cursor con- 
trol, built-in screen editing, and the 
separate numeric keypad all con- 



tribute. Dedicated word processors 
have many special keys on the key- 
board for all the things a word processor 
has to do. A microcomputer keyboard 
has to be used for applications besides 
word processing, so it can't afford the 
luxury of all the extra keys. Both pro- 
grams take advantage of what the com- 
puter has to offer. 

Overall, I rate Wordcraft as a more 
powerful word processor. However, 
WordPro is much easier to learn. If you 
don't use Wordcraft every day, you will 
find yourself frequently looking things 
up, even if you learned it thoroughly 
the first time around. Beyond that, it 
really depends on what you want to do. 
If you plan to do a lot of "boiler- 
plating" (putting a document together 
using standard phrases and paragraphs) 
then you will find WordPro easier to 
use. If you're working on a really long 
document, such as a book, then the 
chapter organization of Wordcraft will 
be handy. For full control of a variety of 
letter-quality printers, for tabular 
material, and for material wider than 
80 columns, Wordcraft has the edge. A 
big point in WordPro's favor is that it is 
(in its many versions) already the most 
popular word processor on the market 
for Commodore systems. This means 
that it is easier to exchange files with 
other people and that commercial pro- 
grams, such as spelling checkers and 



data-base managers, will be written for 
WordPro first. 

When you consider word processors 
for the 8096 you shouldn't forget 
Silicon Office — a combination word 
processor, data-base manager, and com- 
munications package. Contributing 
Editor Jim Strasma covered it in a full- 
length review in MICRO'S June issue. 
He was particularly impressed with the 
word processor portion. It can handle 
long files much better (the whole 
disk!), can handle multiple-column 
documents, and can perform calcula- 
tions using information from the data 
base. The $995 price is out of the range 
of the word processors covered here, 
but if you need a data-base manager, 
too, be sure to give Silicon Office a lot 
of consideration. 

WordPro is distributed to dealers by 
Professional Software, Inc., 51 Fremont 
Street, Needham, MA 02194. Word- 
craft 80 and Wordcraft Ultra are 
distributed to dealers by Computer 
Marketing Services, Inc., 300 W. 
Mailton Pike, Suite 26, Cherry Hill, NJ 
08002. 



Special thanks to Jim Lucivero of 
NEECO in Needham, MA, for the use 
of letter-quality printers used in this 
review. 

ilMCRO 



ANNOUNCING A NEW JOURNAL 
^^ DEVOTED TO ALL ASPECTS 
^Qa of MICROCOMPUTER 

Vy^^^S^ UNDERGRADUATE 

PREMIER *QU^ 
ISSUE ^ 
FEBRUARY 1983 V^V 



=^ 



wr 1 te : 

Col leg! ate Microcomputer 
Rose-Hulman Institute of Technology 
Terre Haute IN 47803 USA 

Prospectus sent upon request. 



OSI Disk Users 



Double your disk storage capacity 
Without adding disk drives 

Now you can more than double your usable floppy disk 
storage capacity — for a fraction of the cost of additional 
disk drives. Modular Systems' DiskDoubler^" is adouble- 
density adapter that doubles the storage capacity of 
each disk track. The DiskDoubler plugs directly into an 
OSI disk interface board. No changes to hardware or 
software are required. 

■■.rhe DiskDoubler increases total disk space under OS- 
65U to 550K; under OS-65D to 473K for 8-inch floppies, 
to 163K for mini-floppies. With the DiskDoubler, each 
drive does the work of two. You can have more and 
larger programs, related files, and disk utilities on 
the same disk — for easier operation without constant 
disk changes. 

Your OSI system is an investment in computing power. 
Ciet the full value from the disk hardware and software 
that you already own. Just write to us, and we'll send you 
the full story on the DiskDoubler, along with the rest 
of our growing family of products for OSI disk systems. 

™DiskDoubler is a trademark of Modular Systems . 

Post Office Box 160 
Oradell, NJ 07649.0016 
Telephone 201 262.0093 



Modular Systems 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



77 



Now . . . The Ultimate 
In Wordprocessing For 
The Commodore Computer. 
WORDCRAFT ULTRA! 



Wordcraft ULTRA™ turns your Commodore microcomputer into one of the 
world's most advanced word processing systems, incorporating features 
previously found only in systems priced thousands of dollars higher! 

• True proportional spacing with inter-character and 
inter-word spacing ! 

• Multi-user with up to 8 CPU's sharing one or more 
disk drives and printers with no extra hardware 
required other than a cable! 

• Screen layout matches the printed document! You'll 
love the "what you see is what you get" feeling. 

• Continuous centering, delete and insert, movement 
of text, search and replace, tab and indent, bold 
print and underline ... a seemingly endless list of 
features designed to make text editing as simple and 
complete as possible! 

• Wordcraft ULTRA runs on the CBM 8032. 8096 or 
Madison Computer's Z-RAM™ board. The Z-RAM 
Board not only expands your computer to 96K but 
also adds CP/M™. 

Why settle for less when you get so much more with Wordcraft ULTRA 
on the Commodore Computer! 

Contact Your Nearest Commodore Dealer Today . . . 

You'll Be So Glad You Did ! 



In The East Call: 

COMPUTER 
MARKETING services inc. 

300 W. Marlton Pike, Suite 26 
Cherry Hill, New Jersey 08002 
[609] 795-9480 



In The West Call: 

CIMARRON 
CORPORATION 

666 Baker Street, Suite 31 9 

Costa Mesa, California 92626 

[71 4] 641 -11 56 



Z RAM IS a Lrademark of Madison Computer 

CP/M IS a trademark of Digital Research 

Wordcraft Ultra is a trademark of Dataview Ltd 



78 



MICRO - The 6502/6809 Journal 



No, 54 - November 1! 



Apple Hi-Res Graphics 
and Memory Use 



by Dan Weston 



This article examines the 
conflicts of programs and hi-res 
graphics on the Apple II, plus 
several techniques to avoid 
these conflicts. 



Hi-Res 

requires: 

Apple II with 32K 



when you begin to write long programs 
that use the hi-res pages of the Apple II, 
you will overwrite the graphic display 
area if your program and variables are 
longer than 6K. There are many ways 
to get around this problem, which in- 
volve manipulating the pointers Apple- 
soft uses to control memory usage. Here 
I discuss several methods for making the 
most of your computer's memory. 

Normally a BASIC program is loaded 
beginning at memory location $800 
(2048). The program fills memory up- 
wards from $800. LOMEM is set to the 
end of the program and will change as 
the program changes. 

Simple variables are stored from 
LOMEM upward as they are defined by 
the program. Arrays are stored from the 
end of simple variables upward. An ad- 
dition to the simple variable space will 
push the array variables upward with 
no loss of integrity. Finally, string 
variables are stored from the top of 
available memory, HIMEM, downward 
in memory, with new strings being 
placed in successively lower memory 
locations. The pointers that guide the 
placement of variables are summarized 
in figure 1, and will be discussed later 
in this article. 

The problem with this storage 
scheme is that the hi-res pages are 
located between the program and the 



end of memory. Hi-res page 1 display 
area sits between $2000 and $4000 
(16384-24575), and hi-res page 2 sits 
from $4000 to $6000 (24576-32758). 
There is a 6K block of memory between 
$800 and the beginning of hi-res page 1. 
If your program is longer than 6K and 
invokes HGR, you will find that the 
last portion of your program has been 
wiped from memory. Even with pro- 
grams shorter than 6K, an HGR call can 
wipe out arrays and variables that are 
stored above the program. 

To avoid this problem, set LOMEM 



at the upper end of the hi-res page ( 1 or 
2), so that simple variables and arrays 
will be stored above the hi-res area 
rather than across it. This method re- 
quires that the program be less than 6K, 
and that the LOMEM statement come 
before any variables are defined. 
LOMEM: 16384 will store variables 
above hi-res page 1. LOMEM: 24576 
will store variables above hi-res page 2. 
Another method is to put graphics 
on hi-res page 2 instead of page 1 . This 
frees the 8K bytes of the first hi-res page 
for program and variable storage, giving 



Figure 1: Applesoft Memory and Variable Pointers 



Pointer 
Name 



Hex Dec Normal Setting Special Effects 



Beginning of 

Applesoft 

program 


$67 
$68 


103 
104 


program loads 
at $800 


POKE 103,1 
POKE 104,64 
POKE 16384,0 

POKE 103, 1 
POKE 104,96 
POKE 24576,0 


: program loads 
: above hi-res 
: page 1 

: program loads 
: above hi-res 
• page 2 


LOMEM 
beginning of 
simple 


$69 
$6A 


105 
106 


end of current 
program 


POKE 105,1 
POKE 106,64 


: put variables 
: above hi-res 
: page 1 


variables 















POKE 105,0 
POKE 106,8 


LOMEM at $800 
below hi-res 


End of 
simple 
variables 


$6B 
$6C 


107 
108 


adjusts with 
size of 
variable table 


POKE 107,0 
POKE 108,8 


simple 
variables 
below hi-res 


End of array 
variables 


$6D 
$6E 


109 
110 


adjusts with 
size of 
variable table 


POKE 109,0 
POKE 110,8 


array 
variables 
below hi-res 


End of string 
variables 


$6F 
$70 


111 
112 


adjusts with 
size of string 
table 


POKE 111,0 
POKE 112,32 


strings put 
below hi-res 
page 1 


HIMEM 
beginning of 
string data 


$73 
$74 


115 
116 


top of usable 
memory, low end 
of DOS buffers 


POKE 115,0 
POKE 116,32 


HIMEM at 
$2000, below 
hi-res page 1 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



79 



Listing 1 

100 HCME ! PRIWT "VARIABU; POIWrER CHANGE TEST" 

110 PRIWT : PRINT : INVERSE : PRINT "BEPORE M3VE" : HOIMKL : PRINT 



PRIWr 



120 

130 

140 

150 

200 

1000 

1005 

1010 

1020 

1030 

1040 

1050 

1090 

1200 

1210 

1220 

1225 

1230 

1232 

1235 

1240 

1250 
1290 
1300 
1310 
1320 
1330 
1340 
1350 
1360 

1370 
1390 
1400 
1410 

1420 
1430 
1440 
1450 
1460 
1465 
1470 



G3SUB 1000: REM 
QDSUB 1300: REM 
QDSUB 1200: REM 
OOSUB 1400: REM 
SID 
REM PRINT POINTER liXATIONS 



PRINT POINTER liXATICNS 
CHANGE POINTERS 
DBCIARE VARIABI£S 
REnmEVB VARIABLES 



PEHC (104);" 
PEHC (106);" 
PEEK (108);" 
PEHC (110);" 
PEEK (112);" 
PEHC (116);" 



"UUUOUUOOOO" 



PROGRAM BBSmnNG" 
t£MEM,VARIAB[£S START" 
WD CF SIMPUE VARIABI£S" 
BID OF ARRAYS" 
BTO OF SraiNGB" 
HIMEM.STRRT OF STOINGS" 



PRIWT PEEK (103) + 256 
PRINT PEHC (105) + 256 
PRIWT PEEK (107) + 256 
PRIWT PEEK (109) + 256 
PRIWT PEHC (111) + 256 
PRIWT PEEK (115) + 256 
RBIDRN 

REM DECIARE SCME VARIABUS 
A = 3:B = 6:C* = 7 
A$ = "T.t.TJj.rjjJ.rjJ.".R<! = 
PRIWT : PRIWT 
INPUT "NOJ SIRING?" ;C$ 
PRIWT : PRIWT 
DIM X(l,l,l) 
PRIWT : PRIWT : INVERSE 
PRIWT : PRINT 
OOSUB 1000 
RETURN 

REM CHANGE POIWTERS 
POKE 105,1: POKE 106,8: RBi 
POKE 107,1: POKE 108,8: REM 
POKE 109,1: POKE 110,8: REM 
PCKE 111,255: PCKE 112,31: REM STRINGS 
PCKE 115,255: POKE 116,31: REM HIMEM 

PRIWT : PRIWT : INVERSE : PRIWT "AFTER POIWTER CHANGE' 
: PRINT 
OOSUB 1000 
REIURN 

REM TEST FOR VARIAHUE RETRIEVAL 

PRIWT : PRIWT : INVERSE : PRIWT "VARIABI^ RETRIEVAL" : NOIMAL 
: PRINT 
PRIWT "A=";A 

'B=";B 

'C%=";C% 

'A$=";A$ 

'B$="rB$ 

'C$=";<S 



PRIWT "AFTER VARIABUBS DEFINED" : NORMAL 



ICMB4 

SIMPUE VAR WD 

ARRAYS 



NORMAL : PRINT 



PRIWT 



PRIWT 
PRIWT 
PRINT 
PRINT 
PRINT 
RETURN 



you an effective program space of 14K, 
instead of the 6K you would have if you 
used page 1. To use page 2, just use 
HGR2 instead of HGR. 

But there are some problems with 
this method. First of all, you cannot 
use the four lines of text below the 
graphics screen with HGR2. This will 
not be a problem if you are using some 
sort of hi-res character generator like 
the DOS TOOL KIT's HRCG. The 
Other problem is that you may want to 
use both of the hi-res pages, say for 
page-flipping. In this case you would be 
back to the original 6K limitation. 

The next method that might be use- 
ful is to relocate the program above the 
hi-res page (or pages). This is done by 
POKEing values into the memory loca- 
tions that Applesoft looks at to see where 
to LOAD or RUN a new program. 
These POKEs must be done before the 
program is loaded or run, say from a 
"hello" program. Here are the POKEs: 



to load above page 1 
POKE 103,1 
POKE 104,64 

POKE 16384,0 ; REM A MUST BE 
PLACED IN MEMORY 
JUST AHEAD OF WHERE 
THE PROGRAM WILL 
LOAD 
to load above page 2 
POKE 103,1 
POKE 104,96 
POKE 24576,0 

If the program is loaded above page 
1 you will have about 22K (in a 48K 
system) for the program and variables. 
If you load above page 2, you will have 
about 14K. The 6K of memory below 
page 1 ($800-$2000) will remain unused 
by Applesoft. 

Once you have loaded your program 
above a hi-res page you will probably 
want to figure out some way to use the 
memory that is just sitting empty 
below page 1. Again, there are several 



options. Here are just a few: 

1. You can locate shape tables, 
especially long tables that will not 
fit at location $300, below the hi-res 
page, beginning at $800. The table 
can either be POKEd into that mem- 
ory range or BLOADed at $800. Then 
the pointers at 232 and 233, which 
tell Applesoft the location of the cur- 
rent shape table, should be POKEd to 
point to this location. You could put 
several tables below page 1 and 
change the pointers as the program 
used one or another of the tables. 

2. The DOS TOOL KIT's high- 
resolution character generator 
(HRCG) can be forced to load below 
page 1 by modifying to LOADHRCG 
program from the TOOL KIT. Insert 
the statement ' HIMEM: 8190 ' in 
the LOADHRCG program just before 
the step that says ' PRINT CHR$[4); 
"BLOAD RBOOT" '. RBOOT uses 
HIMEM to determine where to load 
the character generator. By giving a 
value of 8190 for HIMEM, the pro- 
gram is fooled into putting the 
character generator below page 1, 
rather than at the top of memory. 
You must insert one more step in the 
LOADHRCG program: ' HIMEM: 
38400 ' is needed to reset HIMEM to 
the top of memory, just below the 
DOS buffers. This step should come 
after the step that reads ' CALL 
ADRS: REM INITIALIZE HRCG'. 
The value you use to reset HIMEM 
will depend on the size of your sys- 
tem; the value given is for a 48K 
Apple. Check the DOS manual for 
the figures for other size systems. 

3. If you are writing a very large pro- 
gram that uses lots of variables, 
especially arrays, you may find that 
the variables will overwrite the 
strings, or vice versa, and then you 
have problems. Applesoft uses a set 
of pointers that tell the program 
where to store variables as they are 
encountered. If you change the 
pointers you can fool the program in- 
to using the memory below page 1 
for variable storage, thus freeing 
room at the top of memory for your 
program. 

See the chart in figure 1 for a more 
complete description of the pointers. 
Here are the POKEs that will cause a 
program loaded above the hi-res area to 
place its variables in the memory be- 
tween $800 and $2000. Note: These 
POKEs must be done before any vari- 
ables are used by the program. 

POKE 105,0 

POKE 106,8 : REM LOMEM AT $800 

POKE 107,0 

POKE 108,8 : REM SIMPLE VARIABLES 
ENTERED AT $800 



80 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Listing 2 



]RLN LISTING 1 

VARIABLE POIWTER CHANGE TEST 



BEFORE MOVE 



16385 PROOWM BEGINNING 

17481 UMEM, VARIABLES START 

17481 END OF SIMPLE VARIABLES 

17481 END OF ARRAYS 

38400 END OF STRINGS 

38400 HIMEM, START OF STRINGS 



AFTER POIOTER CHANCZ 



16385 PROGRAM BEGINNING 

2049 LOMEM.VARIABUS START 

2049 END OP SIMPLE VARIABLES 

2049 END OF ARRAYS 

8191 END OP STRINGS 

8191 HIMEM, START OF STRINGS 



NEW STRING7ANYSTRING 



AFTER VARIABLES DEFINED 



16385 PR0C31AM BEGINNING 

2049 UWEM, VARIABLES START 

2091 END OP SIMPLE VARIABUS 

2142 END OP ARRAYS 

8182 END OF STRINGS 

8191 HIMEM, START OF STRINGS 



VARIABLE RETTRIEVAL 



ft=3 

B=6 

C%=7 

ft<;=rjJJJJJJlJ.TJ. 

B$=OUUUUUUUUU 

C$=ANYSTRING 



] 



POKE 109,0 

POKE 1 10,8 : REM ARRAY VARIABLES 
ENTERED AT $800 

POKE 111,0 

POKE 1 12,32 : REM STRINGS ENTERED 
AT $2000 



POKE 115,0 
POKE 116,32 



REM HIMEM AT $2000 



These values are adjusted 
dynamically by Applesoft as variables 
are encountered. This is why many of 
the pointers are set to the same value 
initially. You may want to set the 
pointers differently to allow room 
below hi-res page 1 for some of the 
shape tables or routines that were 
discussed in the first part of the article. 
Play around with the values until you 
can use as much of the Apple's memory 
as possible. 

Listing 1 tests the use of these 
pointers. The program must be loaded 
above one of the hi-res pages, as dis- 
cussed earlier. The program displays 
the pointer values before any manipula- 
tion, after they are lowered, and finally 
after a selection of variables is defined 
by the program. Listing 2 is the output 
of this program. It shows how the 
variable pointers are high, above the 
program, then shift low, below hi-res 
page 1, then adjust with the definition 
of variables. 

Once these values are set this way, 
attempts to add lines to the program 
will result in an "OUT OF MEMORY" 
error, because HIMEM is lower than 
the end of the program. Otherwise, the 
program should run normally and the 
memory manipulations will be trans- 
parent to the user. 

I cannot hope to have covered all 
the tricks that can be used to get the 
most out of your Apple, but I hope that 
the ideas I have put forward will allow 
you to do some exploring and manipu- 
lating on your own. 

References: 

1 . Applesoft Basic Piogiamming Refer- 
ence Manual, Apple Computer Co., 
1978, pp 127, 137, 140. 

2. Lechner and Worth, Beneath Apple 
DOS, Quality Software, 1981, pg. 
8-42. 

3. Wagner, "Assembly Lines, Part 17," 
Softalk, February, 1982. 



Dan Weston is currently teaching a self- 
contained eighth grade in Brooks, Oregon. 
Contact Mr. Weston at 195 23rd NE, 
Salem, OR 97301. 



iMcao 



Our Current 
Best-Seller 



iMcno 

on the Apple 



Volume^ 



INCLUDES I 
DISKETTE I 




$24.95 = 



More than 40 new programs on 
diskette to help you get more from 
your Apple: 

• Machine-Language Aids 

• I/O Enhancements 

• Applesoft Aids 

• Graphics and Games 

• Reference Information 

19 choice articles 

43 tested programs on diskette 

(16 sector DOS 3.3 format) 

Volumes 1 & 2 also available at $24.95' 

Together MICRO on the Apple 1, 

2, & 3 provide more than 110 pro- 
grams on diskette for less than 
$1.00 each. No need to type in 
hundreds of lines of code. 

MICRO makes it easy to order: 
Send check (payable to MICRO) to: 

MICRO INK 

P.O. Box 6502 
Chelmsford, MA 01824 

Gall our toll-free number: 

1-800-345-8112 

(In PA, 1-800-662-2444) 
VISA and MasterCard accepted 

Also available at your local computer store. 

'Add $2.00 shipping per book. 
MA residents add 5%. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



Atari Character Graphics 
from BASIC, Part 2 



by Paul Swanson 



The author adds fine scrolling to 
his character animation 
program, and introduces 
programming ANTIC'S display 
list. 

Character Graphics II 

requires: 

Atari 400/800 

Last month (53:84) I showed you a very 
simple method for using a custom char- 
acter set in BASIC. The amount of 
memory saved by using character 
graphics instead of map-mode graphics 
is substantial. A mode 7 screen would 
normally use almost 4K of memory. 
Replacing it with character graphics re- 
quires ViK for the character set plus 
about 240 bytes for the 20 x 12 
character screen, for a total of about 
770 bytes. 

Of course, character graphics does 
have its drawbacks. For example, how 
do you move an image across the screen 
without having it "jump" from one 
character position to the next? The nor- 
mal ways to put characters on the 
screen don't offer many alternatives. 
You could invent additional characters 
to mimic the movements. All that in- 
volves a lot of programming and many 
characters for each figure on the screen. 

Are character-graphics screens dedi- 
cated to only those applications where 
nothing on the screen moves unless 
you introduce a player or missile? Are 
they just to display a pretty background 
for your program? 

ANTIC 

Fortunately, you have an Atari com- 
puter. The Atari has not one, but two 
microprocessors you can program. The 
Atari has one processor, a 6502, which 
functions as the "brain" of the system. 
It has another, called ANTIC, that con- 
trols just the screen display. 

ANTIC'S language is a machine lan- 
guage, which means it is all numbers, 
but the language is easy to learn 
because there are only a few instruc- 



tions. Its program is called a display 
list. Each instruction does something 
on the screen taken in order from the 
top of the screen to the bottom. 

ANTIC'S program usually starts 
with "blank 8 lines" instructions, 
using three of them so that the dis- 
played images are all visible on the 
screen. Televisions are set up with 
"overscan," which means that part of 
the actual picture is off the screen in all 
four directions so that the movies and 
commercials won't have borders 
around them. On the computer, you 
usually want to see the whole screen, 
so the borders are not so annoying. 

Once you have the blank lines out 
of the way, you need an instruction 
called a Load Memory Scan (LMS) in- 
struction, which tells ANTIC where 
the next line is in memory that you 
want displayed. This command is three 
bytes long. The first byte is the LMS in- 
struction and the next two define the 
memory location. 

If you continue using LMS instruc- 
tions for each line on the screen, you 
can put every line on the screen in a dif- 
ferent part of memory. This is not 
usually done. Instead, you can follow 
an LMS instruction with a Mode Line 
instruction, which tells ANTIC to keep 
incrementing the memory "pointer" 
for each consecutive line. 

The last instruction in the display 
list is the "Jump on Vertical Blank" 
(JVBJ instruction. A JVB tells ANTIC to 
wait until the television picture is com- 
pleted, which is the end of a sLxtieth-of- 
a-second cycle, then "jump" to the 
location it has in the two bytes that 
follow the JVB. The LMS and the JVB 
are both three-byte instructions. The 
Blank Line and Mode Line instructions 
are both one byte long. 

All of this may mean very little to 
you without an example. To put an ex- 
ample together with the numbers in 
decimal would also mean very little 
because ANTIC interprets them in 
binary. Hexadecimal is a good com- 
promise. In hexadecimal and decimal, 
the following is the program for ANTIC 
that BASIC sets up in response to a 



GRAPHICS 18 statement (mode 2 
without a text window] : 

Hex Decimal Instruction 



70 


112 


Blank 8 lines 


70 


112 




70 


112 




47 


71 


LMS ANTIC 
mode 7, 


XX 


XX 


= BASIC mode 3, 


XX 


XX 


plus 2-byte 
memory location. 


07 


7 


Display ANTIC 
mode 7 


07 


7 




07 


7 




07 


7 




07 


7 




07 


7 




07 


7 




07 


7 




07 


7 




07 


7 




07 


7 




41 


65 


JVB 


XX 


XX 




XX 


XX 





As you can see, the ANTIC numbers 
for the modes are not the same as the 
BASIC numbers for the modes. As you 
become more familiar with display 
lists, you will find that there are more 
modes available than the few that 
BASIC allows. For this example, you 
need to know that BASIC'S mode 2 is 
ANTIC'S mode 7, 

So, what has all this to do with 
moving characters around on a 
character-graphics screen? If there is 
nothing more to gain than being able to 
see what ANTIC 's program looks like, 
then this looks like a mildly educa- 
tional exercise, right? Read on. 

Fine Scrolling 

ANTIC has a few more little twists 
to it than just displaying normal char- 
acters on the screen, or even modified 
characters. It has fine scrolling capabil- 
ities, both horizontally and vertically. 
To use them, you must set the "mode- 



82 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



line" instruction of each line in the 
display list that corresponds to the line 
you want to be able to scroll. That's 
why you need to know what the display 
list looks like. 

Fine scrolling allows you to move 
the entire character row |or all of the 
rows if you like, which is what the pro- 
gram at the end of this article does) one 
dot at a time horizontally and/or ver- 
tically. Using a combination of fine 
scrolling and moving the entire charac- 
ter a whole character position will 
allow you to move a character display 
smoothly. 

To see how to enable the fine scroll- 
ing function, you must first take apart 
the two instructions that result in a 
line on the display. In hexadecimal, for 
an ANTIC mode 7 display, these in- 
structions are the LMS instruction, 47, 
and the mode-line instruction, 07. In 
binary, these are 0100 0111 and 0000 
0111. Using the numbering that makes 
the leftmost binary digit number 7 and 
the rightmost one number zero, the 
binary digits we want are numbers 4 
and 5. Number 4 enables horizontal 
scrolling: 0101 0111 and 0001 0111. 
Number 5 enables vertical scrolling: 
0110 0111 and 0010 0111. Setting both 
to one enables both: 0111 0111 and 
0011 0111. 

To use these from BASIC, we need 
the decimal equivalent. To enable hori- 
zontal and vertical scrolling, add deci- 
mal 48, which is binary 0011 0000. That 
changes the LMS from 71 to 119 and the 
mode-line instruction from 7 to 55. In 
decimal, the final display list for a 
GRAPHICS 18 screen would be: 112 112 
112 1 19 XX XX 55 55 55 55 55 55 55 55 55 
55 55 65 XX xx, where xx stands for a 
memory location not yet determined. 

Special Memory Locations 

Now that we know what to do with 
the display list, where do we find it? 
There are special memory locations in 
the Atari that can give us, or accept 
from us, all kinds of information. For 
example, locations 560 and 561 contain 
the location of the start of the display 
list. If we declare a GRAPHICS 18 
screen in a program, then set a variable 
to PEEK(560)+PEEK(561)*256, that 
variable will have the location of the 
display list ANTIC is using. You can 
write a new location to 560 and 561 if 
you form one on your own, but it is 
usually easier to just modify the one 
BASIC has already set up. 

In the program, we can find the dis- 
play list, then modify all the instruc- 
tions that display a line on the screen 
by adding 48 to it. That will enable the 
scrolling we want. We also need a few 
other special locations. Two locations 
are required to put the amoimt of 



1 REM ««« Custom Character Set ««« 

2 REM ««« Program for Part H »»» 

3 REM 

4 REM 

5 REM ««« Program by ««« 

6 REM ««« Paul S. Swanson ««« 

7 REM 

8 REM 

9 REM Calc. position in mem. 

10 DIM S«(1024) 
20 A=ADR(S«) 

30 B=INT (A/512+1 >«2 
40 CBASE=B«25A-A+1 

47 REM 

48 REM 

49 REM Clear S string 

50 SS(1)=CHR«(0) 

60 S»(1024)=CHR»(0) 
70 SS(2>=S«(1) 

77 REM 

78 REM 

79 REM Move standard set down 

80 FOR 1=0 TO 511 

90 S» <CBASE+I , CBASE+I > =CHR» (PEEK ( 1+57344) > 
100 NEXT I 

107 REM 

108 REM 

109 REM Set # to character 

110 FOR 1=24 TO 31 
120 READ N 

130 S« ( I+CBASE, I+CBASE) =CHR« (N) 
140 NEXT I 

147 REM 

148 REM 

149 REM OR. 2 - No text window 

150 GRAPHICS 18 

157 REM 

158 REM 

159 REM Find Display List 

160 DLIST=PEEK (560) +PEEK (561 > «256 

162 SLOC=PEEK (DLlST+4) +PEEK (DLlST+5> «256 

167 REM 

168 REM 

169 REM Set scroll enables 

170 POKE DLIST+3,PEEK(DLIST+3>+48 
180 FOR 1=6 TO 16 

190 POKE DLlST+I,PEEK(DLlST+I)+48 
200 NEXT I 

207 REM 

208 REM 

209 REM Initialize position 

210 VP0S=96 
220 HP0S=80 
222 POKE 756, B 
224 WING=1 

226 S=14 

227 REM 

228 REM 

229 REM Draw character in position 

230 V=INT(VPOS/16) 

232 IF WING=1 THEN SOUND 0,10,0,6 

240 VSCR0L=VP0S-V«16 

250 H=INT(HP0S/8> 

260 HSCROL=HPOS-H«a 

262 IF WING=1 THEN WlNe=2: SS (CBflSE+25, CBASE+25) =CHR» (0) : S« (CBASE+26, 

CBASE+26 > =CH RS(231>:00T0 266 
264 W1NG=1 ; SS (CBASE+25, CBASE+25> =(>«« ( 195) : S« (CBASE+26, CBASE+26 > =CHRS (36) 
266 POKE 559,0 

270 POKE SL0C+P,0:P=V«24+H:P0KE SL0C+P,3 
280 POKE 54276, HSCROL 
290 POKE 54277, 15-VSCROL 
292 POKE 559,34 
294 SOUND O, 10,0,2 

297 REM 

298 REM 

299 REM Read Joystick 

300 0LDS=S:S=ST1CK(0> 
310 IF S=1S THEN S=OLDS 
320 VMOVE=0 

330 HMOVE=0 

340 IF S=9 OR S=13 OR S=3 THEN VM0VE=2 

350 IF S=10 OR S=14 OR S=6 THEN VM0VE=-2 

360 IF S>4 AND S<8 THEN W10VE=1 

370 IF S>8 AND S< 12 THEN HM0VE=-1 

380 IF VMOVE+VPOS>=0 AND VMOVE+VPOS< 191 THEN VPOS=VPOS+VMOVE 

390 IF HMOVE+HPOS>=0 AND HMOVE+HPOS< 192 THEN HPOS=HPOS+HMOVE 

400 IF VM0VE=2 THEN WING=2 

410 GOTO 230 

1000 DATA 0,195,36,24,24,36,0,0 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



scrolling we want and one is required to 
turn ANTIC off when we change the 
scrolling values. If we don't turn AN- 
TIC off, we get some very annoying 
"snow" on the screen. Other, less 
predictable things have been reported 
happening when ANTIC was on when 
scrolling values were changed. 

The Program 

It is always easier to see what is 
happening when you have a real exam- 
ple in front of you. Enter the program 
into your Atari so that your reading 
keeps up with the amount you have 
entered. That will make it easer to see 
what's going on. 

Lines 1 through 150 are actually all 
explained in Part 1 . 

Lines 10 through 40 find a ViK 
boundary in the S$ string. Lines 50 
through 70 clear the S$ string to ASCII 
code zeroes. Lines 80 through 100 
move the "built-in" character set 
down (not required for this program]. 
Lines 110 through 140 insert the 
special character into the set, and line 
150 declares graphics mode 2 without a 
text window. 

After you have lines I through 150 
typed into your Atari, enter through line 
162. Line 160 sets the variable DLIST 



equal to the location where the display 
list created by BASIC starts. Line 162 
looks at the memory location in that 
display list where the screen starts in 
memory. This is required later on. 

From there through line 200, the 
program sets the enable bits on all of 
the ANTIC instructions that display a 
line on the screen. Since you know that 
one will be changed from 71 to 119 and 
the other from 7 to 55, you could use 
the number 119 in line 170 instead of 
PEEK(DLIST-i-3)-i-48 and 55 in line 
190 instead of PEEK(DLIST-i-I) -1-48. 
The more generalized form in the pro- 
gram will make it more easily adapt- 
able to other display list applications. 

Moving up to line 224 presents a 
few unusual statements. These state- 
ments initialize everything that didn't 
fit into the above categories. VPOS and 
HPOS are initialized to somewhere in 
the middle of the screen. VPOS and 
HPOS are the vertical and horizontal 
positions — not character positions, 
but the positions in dots — of the figure 
we will be moving. Each character is 16 
dots high and 8 dots wide. Line 222 sets 
the character set base address. This state- 
ment was also used in Part I. WING 
[line 224) keeps track of which position 
the "wings" are in. S is initialized so 
that the bird will be flying up when the 



main part of the program begins. 

Lines 230 through 260 calculate the 
character position on the screen with 
the remainder from the division deter- 
mining the fine-scrolling amount. 
Since the characters are 16 dots high 
and 8 dots wide in mode 2, these are the 
two values by which we divide. The 
SOUND statement doesn't have any- 
thing to do with the position, exactly. 
It is placed there as a matter of timing 
so that the "wingflapping" noise is in- 
itiated properly. 

Lines 262 and 264 take care of put- 
ting the wings in the correct position, 
alternating by setting WING to 2 if it is 
I and to I if it is 2. Again, the subscripts 
for the S$ string and the values for the 
CHR$ function are explained in Part I . 

Finally, we get to where the real ac- 
tion takes place in the program. Line 
266 puts a zero in location 559, which 
turns ANTIC off as soon as it finishes 
the current sweep of the screen. The 
next statement will not need ANTIC 
off, but will function as enough of a 
delay to guarantee that the current 
sweep of the screen is completed before 
the fine scrolling values are POKEd in- 
to the special memory locations. 

Line 270 erases the old position of 
the figure, then calculates the new 
position and puts the figure there. 



TIRED OF TYPING? 

MICRO has the solution. 

Order a diskette of three recent utility pro- 
grams for the Apple. For only $10.00, plus 
$2.00 shipping and handling, you will receive a 
DOS 3.3 diskette containing the source and 
assembled listings of: 

Applesoft Vaiiable Dump by Philippe Francois 
(MICRO, April 1982) 

Stiaightfonvaid Garbage Collection for the 
Apple by Cornells Bongers (MICRO, August 

1982) 

COMPRESS by Barton Bauers (MICRO, 
October, 1982) 

Please send check, money order, or VISA or 
MasterCard number. Only prepaid orders 
accepted. If you missed the above issues of 
MICRO they can be ordered now! Include $2.50 
for each issue. 

Send orders to: 

Apple Utility Disk 

MICRO 

P.O. Box 6502 

Chelmsford, MA 01824 



"INTERESTING SOFTWARE" 

8781 Troy St. • Spring Valley, CA92077 

(714) 466-2200 



WORLD ALPHABETS 



. Jl f -J!i:.? 


rJt. .-.Jik o\t-M 


1 J ■- 


!■-■■ 


H M w r 


■i. ■:^ ^^ d ':\ 'i y 


d .; 


4, 


ileTH ensT 


bboouMj. fl niijeHnq-i 







Ten type fonts allow user to create text or use pro- 
nunciation tables In Arabic, Cherokee Indian, 
Hieroglyphics, Greek, Hebrew, Japanese, Rus- 
sian, Sanskrit or Roman. Author: W.C. Jones 



Diskette 



$89.95 



BASIC LEARNING 
PACKAGE 

An Introduction to the Apple II or II Plus Computer. 
Teaches beginner to program in BASIC. Author: J.J. 
Sudlkatus 



Diskette 



$49.95 



Both require an Apple II with Applesoft, 48K, plus disk 
drive. Epsom pi„iter with Groftrox Is optional. 

Apple II or II Plus and Applesoft are trademarks of Apple Computer, Inc. 



84 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



POSITION statements do not work 
when you enable the scroll because 
ANTIC automatically assumes a "wide 
playfield" instead of a normal one, 
which has 24-character lines instead of 
20-character lines. That is why the for- 
mula P = V*24 + H is required. The 
variable P will be the "old" position for 
the next loop, so that you don't have to 
calculate anything to erase the old 
figure before you POKE the new one 
into place. 

Lines 280 and 290 set the horizontal 
and vertical values into the special 
memory locations reserved for them. 
Note that the vertical scroll value runs 
in the opposite direction and must be 
subtracted from its maximum value, 
15, to get the correct one. When these 
values are POKEd, ANTIC is turned 
back on by POKEing 34 into location 
559, as is done in line 292. Line 294 
stops the "wing-flapping" sound and, 
like line 232, is positioned here for the 
sake of timing the sound. 

Now that we have all of the state- 
ments in place for moving the figure 
around, we need some way to control 
where it moves. I chose the joystick for 
input. It is read at line 300. Line 310 
causes all readings where the stick is in 
the "neutral" position to be ignored. 
These two statements will use the last 
non-neutral position for the direction, 
if the joystick is centered. 



When you move the joystick, lines 
320 through 390 interpret the move- 
ment into the new position by updating 
VPOS and HPOS. The vertical move- 
ments are all 2 dots at a time to com- 
pensate for the difference in the two 
dimensions so that the bird will fly up 
at about the same rate as it will fly 
horizontally. Lines 380 and 390 make 
sure the figure stays on the screen, then 
line 400 goes back to put the figure 
where you just moved it. Line 1000 is 
the character shape for the READ at 
line 120. 

Now you can RUN the program 
and move the figure around the screen 
with your joystick. If you don't have 
a joystick, you should be able to 
figure out how to move it with the four 
arrow keys. 

Notice that the figure does flash a 
little when you move it. This happens 
when you turn ANTIC off. This can be 
limited by decreasing the delay (line 
270) after you turn ANTIC off. Remem- 
ber that line 270 does not require that 
ANTIC be off, so it functions as the 
delay. You can shorten the delay as 
much as you like until you start getting 
snow on the screen when you move the 
figure horizontally. You can do this by 
breaking the line up so that the first 
statement executes before the POKE 
559 statement. This snow is the prob- 
lem you avoid by turning ANTIC off. 



Note that I did include a few state- 
ments in the program that weren't des- 
cribed. These statements are set up to 
cause the bird to flap its wings when it 
is moving horizontally or up [i.e., 
VMOVE does not indicate "down"). 
When the bird moves downward, the 
wings do not flap and the flapping 
sound stops. 

The program is not the most effi- 
cient way to scroll character-graphics 
screens, but it does show the general 
idea of how it is done. You can make 
the program more efficient by doing 
things like replacing the part that reads 
and interprets the joystick with a faster 
routine. You may develop a different 
way of handling the positions from the 
VPOS and HPOS approach. If you keep 
the character position and the scroll 
values separately, you will not need the 
two divisions. If you do it right, you 
can gain some speed there. Remember 
that the program was written to be in- 
structional rather than efficient, so you 
should find many areas where you can 
speed up. 

Play around with the program until 
you get ideas on how to use character 
graphics for your own programming 
project. Your own project will familiar- 
ize you with the advantages of charac- 
ter graphics. Remember, too, that you 
are saving lots of memory. 

ilMCftO 



Challenger 1P 



OSI SOFTWARE 



Superboard II 



ncXUOS is a remarkable disk operating system wliicli sur- 
passes tine capabilities of OS65D. But because HEXDOS uses 
subroutines in OSI's ROM BASIC, it is very compact (only 2K). 
HEXDOS provides you with easy-to-use commands and saves 
10K of memory and disk space! 

• Load or save BASIC programs, machine language, and data 
files by name. Chain BASIC programs from disk. 

• Up to 22 data files may be open simultaneously. 

• Resides at the beginning of RAM, leaving maximum space 
for user programs. 

• Full trace of BASIC programs with optional single-stepping. 

• True line editing allows you to correct mistakes easily. 

• Supports random-access data files, real-time clock, and tone 
generator. 

• Includes a disassembler and demonstration programs: 
CHECKBOOK and ADDRESSBOOK (personal data base 
management), LIFE, SURROUND, REVERSI, BACKGAM- 
MON, and BSR CONTROLLER (home control). 

• Satisfaction guaranteed, or your money promptly refunded. 

"Documentation is clear and complete, the best I have seen 
from any source." 

- Ronald C. Whitaker, Compute! magazine, AprN 1981 

Price: $49.50 (5y4-inch diskette and 40-page manual) 



HEX ASM is a powerful macro-assembler which supports 
conditional assembly, linked source files, symbol tables, and 
user-defined macros. Designed to replace OSI's considerably 
less powerful assembler. Also included; a simple editor for text 
files, a utility to renumber BASIC programs, and a disk tester/ 
copier. Requires HEXDOS and 20K RAM. 
Price: $38.50 (diskette and manual) 

TEC65 is an OSI version of DEC's popular TECO editing 
language. TEC65 allows you to perform complex editing tasks 
and major text reorganization with simple command strings. Right 
justification and title centering options for word processing. Re- 
quires HEXDOS. 
Price: $38.50 (diskette and manual) 

rOCAL-65 is an implementation of DEC's unique pro- 
gramming language. With 9-digit floating-point arithmetic and 
transcendental functions, FOCAL-65 is especially suited for 
mathematical and scientific programs. Easy to learn and pro- 
gram. Requires HEXDOS and 16K RAM. 
Price: $66.00 (diskette and two manuals) 

your satisfaction guaranteed, or your money promptly and 
completely refunded. For more Information, send $1.00 for 
our catalog of OSI, Apple, AIM, KIM, and SYM software. 



The 6502 Program Exchange 

2920 W. Moana, Reno, NV 89509 



MasterCard 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



85 



/MCQO 

Apple Slices 



By Tim Osborn 



This month's column discusses one of 
the fundamental elements of any com- 
puter system, the block move. I also 
present a subroutine to perform block 
moves. If you find yourself saying "but 
the monitor already includes a block- 
move routine," read on; I'll show you 
why you may want to use my block 
move instead. I'll also show you why it 
is sometimes advantageous to use the 
monitor's routine. 

What Is a Block Move? 

A block move is a byte-by-byte 
movement of data from one range of 
memory to another. The area from 
where the data originates is called the 
source and the target area is called the 
destination. The length of the move is 
the difference between the source end 
and the source beginning plus one. The 
distance of the move is the difference 
between the source beginning and the 
destination beginning. 

Let's use the monitor's routine to il- 
lustrate some examples of block moves. 
Type in the following sequence: 

]CALL -151 

(enter the monitor) 
*3000:01 02 03 04 05 06 07 08 

(initialize memory) 
*3000 < 3002.3003M 

(move 3002 - 3003 to 3000 - 3001) 

Now type: 

*3000.3007 
(dump range of memory) 

and receive the following dump: 

3000- 03 04 03 04 05 06 07 08 

Observe that the block move was suc- 
cessful. Now try this: 

*3001 < 3000.3006M 

(move 3000 - 3006 to 3001 - 3007) 
*3000,3007 

(dump range of memory) 

and receive the following dump: 

3000- 03 03 03 03 03 03 03 03 

The computer first moved 3000 to 
3001, then 3001 to 3002, and so on, so 
that the full destination range is filled 
with the same value. 

This situation is called an overlap. 
When the destination is higher than the 



source combined with an overlap, it is 
necessary to move the data starting at 
the source end working toward the 
source beginning, which is called a 
right-move, as opposed to a left-move. 
By doing a right-move in the above 
example and dumping the range of 
memory, the following results would 
be obtained: 

3000- 03 03 04 03 04 05 06 07 

These results are correct. 



A similar problem exists where the 
destination start address is lower than 
the source start address and the two 
ranges overlap. In this case the right- 
move (source-end first) will cause the 
same sort of problems and it is neces- 
sary to use the standard left-move 
(source start first) to avoid these prob- 
lems. When the ranges do not overlap, 
it makes no difference which type of 
move is used, either the right-move or 
the left-move. 











1 ; 

2 ; 
3 


**************************** 










* 


BLOCK-MOVE * 










4 


* 


TIM OSBORN * 










5 


* 












6 


* A P 


PLE SLICES* 










7 , 


* 












8 

9 ; 
10 
11 
12 


**************************** 










PAGE ZERO EQUATES 










Al THRU A4 ARE PASSED FROM THE MDNITOR 










13 


A5 IS 


COMPUTED INTERNALLY 










14 






003C 








15 AIL 


EPZ $3C rAl=T1E START OF SOUHLIE 


003D 








16 AIM 


EPZ S3D 


003E 








17 A2L 


EPZ $3E ;A2=TiE END OF SOURCE 


003F 








18 A?l 


EPZ $3F 


0042 








19 A4L 


EPZ $42 ;A4=T1E ST7\RT OF DESTINATION 


0043 








20 A4fJ 


EPZ S43 


0044 








21 A5L 


EPZ S44 ;A5=T1E END OF DESTINATION 


0045 








22 AW 


EPZ S45 


0800 








23 






OROO 








24 


OTHER 


EQUATES 


OBOO 








25 






OflOO 








26 


CTRL-Y VECTOR 1 TTATION 


03F8 








27 tKRADR 


SOU $3F8 


OROO 








28 






0300 








29 




ORG $300 


0300 








30 




OBJ $800 


0300 








31 






0300 








32 


START VfILL ESTABLI91 TIE CONTROL-Y 


0300 








33 


VtlL'TOR. VHEH THE fOJITOR ENCOUNTERS 


0300 








34 


A CONTROL-Y IT VfILL JUMP TO ENTRY 


0300 








35 






0300 


A9 


4C 




36 START 


IDA #$4C ;JUMP INSTRUCTION 


0302 


8D 


F8 


03 


37 




STA USRADR 


0305 


A9 


10 




38 




IXA #ENTRlf ;I£W BYTE OF ENTRY ADDRESS 


0307 


8D 


F9 


03 


39 




STA USRADR+1 


030\ A9 


03 




40 




liJA /ENTRY ;HI(H BYTE OF ENTRY ADDRESS 


030C 


8D 


FA 


03 


41 




STA USRADR+2 


030F 


60 






42 




RTS ! INITIALIZATION COMPIKTE 


0310 








43 






0310 








44 


DISTL+DIST^ RinYCU: START'S STORAGE 


0310 








45 


SINCE 


START IS ONLY NEEDED AT BRUN 


0310 








46 






0300 








47 I 


3ISTL 


BQU START r INTERNAL STORAGE FOR 


0301 








48 I 


3ISTH 


EQU START+1 rlHE DISTAtCE OF TIE ICfVE 


0310 








49 






0310 








50 


ENTTOT 


IS TIE MAIN ENTRY POINT 


0310 








51 


vHiai 


IS READIED VHEN TIE CTRL-Y 


0310 








52 


IS HJCOUNTERED 


0310 








53 






0310 


38 






54 


TJTRY 


SEC rCOMPUTE DISTANCE 


0311 


A5 


42 




55 




liJA A4L ;BY SUBl'RACTING 


0313 


E5 


3C 




56 




SBC AIL ;THE SOURCE START (Al) FROM 


0315 


8D 


00 


03 


57 




STA DISTL r THE DESTINATION START (A4) 


0318 


A5 


43 




58 




LCft A4H 


031A 


E5 


3D 




59 




SBC AH 


031C 
031F 


8D 
18 


01 


03 


60 
61 




^ """^ (Continued) 



86 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



The Block-Move Routine 

BLOCK-MOVE (listing 1) incor- 
porates the ideas expressed above by 
performing all block moves where the 
destination address is higher than the 
source address with a right-move and 
all moves where the destination ad- 
dress is lower than the source address 
with a left- move. 

To install BLOCK-MOVE you must 
BRUN the object code. The routine 
START will enable the CTRL-Y vector 
by initializing a JMP $310 (the address 
of BLOCK-MOVE'S ENTRY routine) 
into $3F8 through $3FA. When the 
monitor encounters a CTRL-Y (control 
key pressed simultaneously with the Y 
key) it will effectively JSR to $3F8. 
After START initializes the CTRL-Y 
vector the monitor will effectively JSR 
to ENTRY upon encountering a CTRL-Y. 

The syntax to use BLOCK-MOVE is 
exactly the same as that to use the 
monitor M command: 

(dest) < (start).(end) 

The (end) statement is then followed 
by a CTRL-Y instead of the usual M. 
When execution reaches ENTRY the 
monitor subroutines have already 
converted: 

1. (dest) to a sixteen-bit integer stored 
at $42 through $43 [A4L through 
A4Hor A4). 

2. (start) to a sixteen-bit integer stored 
at $3C through $3D (AIL through 
A2H or Al). 

3. (end) to a sixteen-bit integer stored 
at $3E through $3F {A21 through 
A2Hor A2). 

All of the above values are in 
modulo-256 form in low-byte, high- 
byte order. A user- written program can 
make use of BLOCK-MOVE by setting 
up the above values and JSRing to 
ENTRY. 

BLOCK-MOVE must first compute 
the distance (DISTL through DISTH, 
$300 through $301) by subtracting Al 
from A4 and storing the results at DIST 
(see lines 54 through 60). After this, 
DIST is added to A2 to obtain the 
destination end address — A5 (lines 61 
through 67). Next destination start is 
compared to the source start in lines 68 
through 76. If the source start is greater 
than the destination start, the 
MOVELT routine is used to perform 
the block move. If the destination start 
is greater than the source start then 
MOVERT routine is used. If the 
destination start is equal to the source 
start then no move is performed and an 
RTS is done at line 74. 

MOVERT takes bytes starting at A2 



0320 AD 


00 03 


62 




UA DISTL 


•ADD DISTANCE 


0323 65 


3E 


63 




ADC A2L 


•TO SOURCE END 


0325 85 


44 


64 




STA A5L 


•TO OWl'AIN DESTINATION END 


0327 AD 


01 03 


65 




UA DISTH 




032A 65 


3F 


66 




ADC A21 




032C 85 


45 


67 




STA AM 




032E AS 


42 


68 




U3A A4L 


•.SEE IF DESTINATION IS 


0330 C5 


3C 


69 




CMP AIL 


•GREATER OR I£SS IH.AN SOURCE 


0332 DO 


07 


70 




BNE anwi 




0334 A5 


43 


71 




IDA A*! 


•ALSO CHECK TO MAKE SURE 


0336 E5 


3D 


72 




SBC AlH 


•THAT Al DOES 'NT = A4 


0338 DO 


05 


73 




ENE BTVfCn 




033A 60 




74 




RTS 


•A1=A4 SO REOTRN 


033B A5 


43 


75 


ENTrori 


IDA pm 




033D E5 


3D 


76 




SBC AlH 


•SOUHCE 


033F BO 


03 


77 


E>TrRY2 


BCS tfJJEKV 


•IT'S GREATER -M3VE RIOTT 


0341 4C 


67 03 


78 




JMP rCWELT 


■IT'S I£SS -M3VE USFT 


0344 




79 








0344 




80 


-MOVERT 


M3VES THE DATA STARTING AT TIE 


0344 




81 


•SOURCE 


END WORKING TOWARDS THE 


0344 




82 


SOUHCE 


BEGINNING 




0344 




83 








0344 AO 


00 


84 MOVERT 


UW #$00 




0346 31 


3E 


35 M3VERT1 


IDA (A2L),Y 


GO FROM OID END 


0348 91 


44 


86 




STA (A5L),Y 


TO NEW END 


034A C6 


44 


87 




DEC A5L 


DECREMENT DESTINATION POINTER 


034C A9 


FF 


88 




LCft #$FF 




034E C5 44 


89 




CMP A5L 


IF A5I;=SFF 


0350 DO 


02 


90 




alE IOVERT2 




0352 C6 


45 


91 




DEC AM 


IHEN DEEREMEJTT A5H 


0354 C6 


3E 


92 ya/EKTl 


DEE A2L 


DECRIMEJ^ SOURCE POINTER 


0356 C5 


3E 


93 




CMP A2L 


IF A2li=$FF 


0358 DO 


02 


94 




are MC)VERT3 




035A C6 


3F 


95 




DEC A71 


1MEN DBCREMEm" A7H 


035C A5 


44 


96 M3VERT3 


IDA A5L 


SEE IF WE HAVE M3VED 


035E C5 


42 


97 




CMP A4L 


ALL BYTES (A5=A4) 


0360 A5 


45 


98 




IDA A91 




0362 E5 


43 


99 




SBC A4H 




0364 BO 


EO 


100 




BCS M3VERT1 


NO MUST CONTINUE 


0366 60 




101 




RTS 


ALL DONE 


0367 




102 








0367 




103 


MCVELT 


NDVES THE DATO STORTING AT 


0367 




104 


THE BEGINNING OF THE SOUHCE WORKING 


0367 




105 


TOWARDS 


THE END OF TIE SOURCE 


0367 




106 








0367 AO 


00 


107 ^ 


OVELT 


Ufi #$00 


INITI.ALI2E Y-REG 


0369 Bl 


3C 


108 t 


OVELTl 


UA (A1L),Y 


MOVE FRCM OID SOURCE 


036B 91 


42 


109 




STA (A4L),Y 


TO NEW DESTINATION 


036D E6 


3C 


110 




INC AIL 


INCREMENT SOURCE POINTER 


036F DO 


02 


111 




BNE M3VELT2 


IF EX3UAL TO ZERO 


0371 B6 


3D 


112 




INC AlH 


THEN INCREMEOT HICH BYTE 


0373 E6 


42 


113 ^ 


CIVELT2 


INC A4L 


ItCREMETfT DEST POIVl'tK 


0375 DO 


02 


114 




are rciVELT3 


IF EQUAL TO ZERO 


0377 B5 


43 


115 




ItC A4H 


THEN INCREMENT HIOT BYTE 


0379 A5 


44 


116 ^ 


OVELT3 


IDA A5L 


CHEEK TO SEE IF 


037B C5 


42 


117 




CMP A4L 


WE ARE DONE WITH MOVE (A4=A5) 


037D A5 


45 


118 




IDA A5H 




037F E5 


43 


119 




SBC A41 




0381 BO 


E6 


120 




BCS rCWELTl 


NOT DONE, lOOP 


0383 60 




121 




RTS 


EISE REnjRN TO CAiiFR 


0384 




122 




END 





(source end) and moves them to A5 
(destination end). It decrements both 
values moving another byte after each 
decrement until A5 = A4, which 
means the destination pointer is equal 
to the destination beginning. (See lines 
84 through 101.) 

MOVELT takes bytes starting at Al 
(source start) and moves them to A4 
[destination start). It increments both 
values moving another byte after each 
increment until A4 = A5, which 
means that the destination pointer is 
equal to the destination end. (See lines 
107 through 122.) 

Both routines return to the monitor 
(or user- written program) when they 



have completed their task. Experiment 
with BLOCK-MOVE and the monitor 
move command to get a feel for the dif- 
ferences between the two routines. 

The advantage of using the monitor 
subroutine is that it allows you to in- 
itialize memory to desired patterns of 
byte values. It can be very handy, for 
instance, to initialize ranges of 
memory to binary zeros, but it is not 
limited to that. All sorts of patterns can 
be created depending upon the nature 
of the overlap. For those times when 
you are moving data forward with 
overlapping ranges of memory, use 
BLOCK-MOVE. 

jMcaa 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



87 



/MCftO 

Reviews in Brief 



Product Name: 
Equip, req'd: 
Price: 



Manufacturer: 



The Programmable Cube 

Apple II with 48K or 64K and DOS 3.3 

$34.95 includes diskette and extensive 

documentation 

Metacomet Software 

P.O. Box 31337 

Hartford, CT 06103 
Description: This program will solve a Rubik's cube. 
"Cube" will scramble a cube and solve it for you. It also 
has an option to make designs and patterns. It is easy to 
use and relies on standard cube notation for entering moves. 

Pluses: The Piogiammable Cube comes with an extensive 
user's guide to teach how to write programs to make 
designs or even solve cubes based on your own cube-solving 
strategy. It has a "mirror" behind the graphics cube to 
show the obverse sides of the cube. The program also in- 
cludes simulated rotation of the cube as moves are made. 
You can enter a cube of your choice or choose the order of 
the colors on the cube. 

Minuses: The language, while not difficult to learn, is 
similar to many of the graphics-control programs and 
takes a fair amount of time to become familiar with it. 

Skill level required: Ability to follow directions is needed 
to run the solving portion. Previous programming ex- 
perience in any language would be a help to program in 
cube language. 

Reviewer: Phil Daley 



Product Name: Ghost Gobbler 

Equip, req'd: TRS-80 Color Computer with 16K 

Price: $21.95/cassette; $24.95/disk 

Manufacturer: Spectral Associates 

141 Harvard Ave. 

Tacoma, WA 98466 
Description: Ghost Gobbler is Spectral Associates' version 
of the popular arcade game, PAC-MAN. Using a joystick, 
you control a gobbler that travels around a maze eating 
dots. You must be wary of the four ghosts that also fre- 
quent the maze. If they catch you, you will be eaten. Your 
only protection is to eat an "energizer" dot, whereupon 
you can score points by gobbling the ghosts. There are 
17-1- screens, and extra points can be gained by gobbling 
bonus shapes. Extra men can be gained by scoring high. 

Pluses: The game is in 6809 machine language, and comes 
on cassette. The program will load onto disk and execute 
properly from disk once loaded. The game is fast action, 
and operates smoothly in all skill levels. A teleportation 
spot allows the player to quickly escape to another section 
of the board. Sixteen skill levels are available, so novices 
and experts can compete on a more even scale. 

Minuses: The game supports only one player at a time, 
though it does keep records of the ten highest scorers. It 
operates as a linear device rather than a switch type. Many 



users complain of the joystick action at first, but practice 
does improve its action. 

Documentation: A single sheet instruction. 

Skill level required: Anyone who can handle a joystick can 
play the game, but expert skills are required to get past the 
first two or three screens. 

Reviewer: John Steiner 



Product Name: 
Equip, req'd: 

Price: 
Manufacturer: 



Speed Reader 

Apple II with Applesoft in ROM and 

DOS 3.3 

$ 

Special Delivery Software 

10260 Bandley Drive 

Cupertino, CA 95014 
Description: Speed Reader is a five-part reading program 
designed to improve comprehension and increase reading 
speed through the development of concentration, atten- 
tion span, and more effective eye movement. Two copies 
of the Speed Reader Master Program diskettes, one copy of 
the Speed Reader Data diskette, and an easy-to-read 
manual are included in the software package. The main 
menu has five lessons: warm-up excercise (letters), warm- 
up exercise (words), eye movement exercise, column 
reading lesson, and reading passage lesson. 

Pluses: The manual contains charts for each lesson on 
which progress can be recorded; user's scores are provided 
after each activity is completed. Several reading selections 
are offered in Lessons 3, 4, and 5, most of which are in- 
formative and interesting. You can increase reading speed, 
change column justification, and decrease window size in 
Lessons 3, 4, and 5. 

Minuses: Vocabulary level and topics of several selections 
are beyond that of an average fifth-grade student. It is not 
clear to the user whether the RETURN key should be used 
to continue the program; no editing is permitted and selec- 
tions cannot be added to the disk. Only one user can use 
Speed Reader; booting the diskette will not provide several 
users with the program. 

Skill Level Required: Grades five through adult; private in- 
struction. Spelling proficiency is a must as well as typing 
skills. 

Reviewer: Cathy LaSalle 



Product Name: GR2716 ROM/EPROM Emulator 

Equip, req'd: Not applicable 

Price: $78.00 

Manufacturer: Greenwich Instruments Limited 

U.S. Distributor: LMS Electronics 

3401 Monroe Road 

Charlotte, NC 28205 
Description: The GR2716 EPROM Emulator is a pin-for- 
pin replacement of the 2716 EPROM for use during system 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Reviews in Brief (continued) 



development. The device consists of RAM memory and a 
lithium power cell housed in a 24-pin package about .6 in- 
ches high. When used in the read mode, the device is plug- 
ged into a normal system EPROM socket, and functions 
exactly like an EPROM. Connectors with leads are sup- 
plied also. The package is provided with three additional 
wirewrap connections on the end between pins 1 and 24. 
Two of these pins are connected to the system reset to pre- 
vent inadvertent writing to the memory during system 
restart. When the third pin, labeled WE, is connected to a 
normal system static-write enable signal, it causes the cir- 
cuit to function as a static RAM chip. The battery is 
guaranteed to retain memory for three years, with ten 
years quoted as typical. Other versions are available to 
replace other EPROMS. 

Pluses: This processor performs exactly as specified. The 
documentation is terse, but adequate. New literature has 
come out since this review. Sample WE circuits are given 
for several CPUs. 

Minuses: The legs appear fragile and could be broken easily. 
The problem can be circumvented by installing the 
GR2716 into a 24-pin soldertail socket and then plugging 
the entire assembly into the system. One other minor 
problem is the placement of the WE and Reset pins on the 
end of the device. There -have been fit problems on crowded 
boards, but the chip-in-a-socket approach also solved this 
problem by raising the chip above board level. 

Skill level lequiied: Reasonably serious hardware and 
machine-language system software developer. 



Reviewer: Wayne D. Smith 



Product Name; Telewtitei (disk version) 

Equip, req'd; TRS-80C, 16K, RS disk system, 

printer 
Price: $49.95 cassette, $59.95 disk 

Manufacturer: Cognitec 

704 Nob Ave. 

Del Mar, CA 92014 

(714) 755-1258 
Description: Telewritei is a word processor for the TRS- 
80C. The editor features a cursor-oriented, 51- x 
24-character display with real lower-case characters. The 
graphics screen is used for text display, and provides a 
much greater area of visible text than most color computer 
word processors. 

Pluses: Telewritei is one of the better editors I have seen. 
Many features, including embedded printer commands, 
not found on more expensive processors, are available in 
Telewritei. 

Minuses: Requires a disk I/O program on disks. The 
binary file format adds extra steps when using Telewritei 
with an ASCII file. Neither horizontal scrolling nor right 
justification is supported. 

Documentation: Seventy pages of well-written reference 
material are included. 

Skill level required: No previous experience with word 
processors is required. 



The watch is quiet. Scanner,s 
show nothing of rebel activity as you comb 

QUADRANT 



Suddenly, a stargate gapes open, A lone rebel 

ship surges into space. More alien 

comrades follow in attack. You 

must hold the Quadrant 

From the invaders. 

And you must 

doit alone! 




Reviewer: John Steiner 



iSMCftO 



You're combing the quadrant, defending your turf, 
and suddenly, as if from nowhere, an alien ship 
appears. You spin and shoot, lazers blazing and 
blast him into oblivion, with more attackers soon 
to follow. The battle continues and you gain the 
upper hand. Just when you think you've got 
tfiings under control, the alien commander ap- 
pears. He's extremely fast and a very good shot, 
3ut you have a secret weapon, HEAT SEEKERS! 
The flick of a finger destroys every alien in your 
quadrant. With a few seconds rest you prepare 
yourself for the next wave of alien attacl^ sfiips. 
GET READY, HERE THEY COME... FIRE! 

Get Quadrant 6112 from your favorite dealer or 
directly from Sensible Software for only . .34.95 

(Game Paddle Required) 

^ Sensible Softujore 

6619 Perham Drive, 
West Bloomfield, Ml 48033 
' Phone (313) 399-8877 

TM Designates (J.S. Trademarl^s of Sensible Software Inc. 
CoDvriqfit 1982 Sensible Software Inc. 



m 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



89 





li.V 



liiiiilsa' 



IKNIIBM-PC 



HOW TO WRITE AN APPLE 



iMt 




-o>- 



m!^ 



SiiU 



wm 




Si^* H>— M^^^^^H 


6- a^i-^^m 


ii"''?'<'}fl^^H 



LU 

ex. 


1 


o. 


§ 


fr 


Lki 


"/ / 


GC 
O 





3 exce|tonatJlaDol<iidm library. 



*\. 



\ 






^Here'ls3*^!e|lf^s^t©jgiad^eas^ were ever intimidated 



:gi^grarMlll3:S|5^r^ 



^'laf nrtBi»iii»Mi 



®\- 



KivIwifPillivK'AVJlVlill'w 



"t)neifGr the Apple^"6rielor:the IBKPCr 
:a^d^bneftdrtheTRS-80^ r- 
lrl eacK Sf :tPiesie books author Ed Faulk 
'SaaClou through' your favoHte. com- 
puter and takes, the mystery out of writing 
programs for it. Aayou proceed, interest- 
ing chapter by interesting chapter, you'll 



jSRAM. Before you're past Chapter 2 



itiHmtamiiiniw 



book you'll be willing to tackle business 
programs, personal use programs and 
even games and adventures! $14.95 
Get your copy now. Available at computer 
and book stores, or: 

EDATAMOSTx (213)7091202 

9748 Cozycroft Ave., Chatsworth, CA 9131 1 



'Apple is a trademark of Apple Computer. Inc., -IBM-PC is a trademark of IBM Corp.TRS-SO 
VISAMASTERCHARGE accepted. $2.00 stiipping/handling ctiarge. (California residents ; 



;m ark of Tandy Corp 



Reston Publishing Coir 
A Prentice-Hall Compa 
Reston, Virginia 
Toll free (800) 336-033 



mDHSTER mflSH 





The Softivare Farm 
3901 So. Elkhart 
Aurora, CO. 80014 
PH: (303) 690-7559 



It is late at night in a monster infested graveyard and you have been 
given the job of keeping the monsters in. All you have between you and 
complete chaos is a new MonsterMasher System and quick reflexes. 

Monster Mash is an original and unique arcade action game written in 
assembly language for the Apple II and Apple /// (in emulation mode). 



$29.95 



No, 54 - November 1982 



MICRO - The 6502/6809 Journal 











Beware 
the 







■ I' 






For the most onaze 
youVe ever had ai 
thousands of ranc 

mazes, get MONE 
MUNCHERS today- 
millionaire tonight 



$29.95 for the Apple II* 
At computer stores, or: 



1... n.i. n:.l.-_ 
UyDDUDISIIU|l 




9748 Cozycroft Ave., Chatsworth, CA 91311 . (213) 709-1202 



VISA/MASTERCARD accepted. $2.00 shippins/handling charge. 
(California residents add 6V4% sales tax.) 
'Apple II is a trademaric of Apple Computer, Inc. 



Getting Around the Apple 
Hi-Res Graphics Page 



by Eagle I. Berns 



This article describes a method 
to split an Applesoft BASIC 
program in order to make 
available the core both above 
and below the hi-res pages. This 
allows the program to utilize the 
graphics area without having to 
sacrifice portions of memory. 



GETTING 

requires: 

Apple II with 32K 
RENUMBER 



If your Apple II has 48K of memory, and 
you write a program that starts at 
$0800 (hex) and goes to, say, $4100, 
you may notice that though there's still 
a lot of core available for your program, 
you have lost the ability to use either of 
the hi-res graphics pages (the first runs 
from 2000 to 3FFF and the second from 
$4000 to $5FFF). When this problem 
came up for me, I wondered if there 
might be some way to have my pro- 
gram bridge the gap over either or both 
the graphics areas and continue on the 
other side. 

In reading current literature I found 
various references to ways in which 
this could be done. However, they all 
required multiple steps and patching 
source statements. What I wanted was 
an automatic process. There are several 
EXEC files used in the process I even- 
tually developed, but the user of the 
program need only issue the one com- 
mand "RUN SPLIT", and the rest of 
the process is automatic. 

The EXEC files and utility program 
needed to do the job are listed at the 
end of this article. First, however, I will 
give a general description of how the 
task is accomplished, and then a detailed 
description of the program itself. 

Basically, the statements of the 
Applesoft program to be split are scanned 
via their internal pointer links from 
statement to statement, until the last 



statement before location $2000 is 
reached. At this point a number of 
dummy statements are inserted. (This 
version uses the SiRenumber utility 
from the Apple II tool kit to renumber 
the program in a way that allows the in- 
sertion of a number of dummy state- 
ments. A simple modification is neces- 
sary if some other renumber utility is 
used.) The utility then proceeds to find 
the link that exists between the loca- 
tion before $2000, and the location 



directly after $4000. It then finds the 
places to POKE, relinking the program 
across the dummy statements (where 
the graphics area is located). Since a 
LOAD will reset all links, the two 
POKEs must be a part of the original 
program. Also, since the POKEs must 
be there when the split is complete, 
they must be inserted before we begin 
the split, so as not to destroy the 
relative positioning of statements in 
the program. 



Listing 1: SPLIT 

100 TEXT : HOME 

110 PRIWr "ENTEE NAME CP PROGRAM TO SPLIT": PRINT : PRINT : HTAB (7): INPUT 

A$ 
120 PRIWT 
130 PRIWr "ENTER I01EM ADDRESS FOR ITADING PROGRAM": PRINT : PRIOT : HTAB 

(7) : INPUT L 
140 mxm : PRIWT "ENTER 1 IF SPUTTI^JG OVER 4GR1," 
150 PRIWT " 2 IF SPUTTING OVER H(3R2," 

160 PRIHT " IF SPUTTING OVER BOTH . " 

170 PRIWT : PRIWT "VHICH ";: INPUT S 
180 A = IWT (L / 256) 
190 B = L - A * 256 
200 REM 

PCKE 210,8: REM SAVE liDMEM 

POKE 211, A 

REM 

RM SET SPUT BOUNDS. 

REM 212 nous START OF PAGE 

REM 213 HOUS LENGIH 

REM 771 HOUS LENGIH 

REM 

IF S = 1 THEN 320 

IF S = 2 T^iEN 330 

IF S = THEN 340 

GOTO 140 

POKE 213,32: 
POKE 213,32: 
POKE 213,64 



210 
220 
230 
240 
250 
251 
260 
270 
230 
290 
300 
310 
320 
330 
340 
350 



GOTO 360 
GOTO 360 



POKE 212,32: 
POKE 212,64: 
POKE 212,32; 
REM 

360 D$ a CHR$ (4) 
370 PRINT D$; "OPEN SPL.SETOP" 

PRIWT D$;"DEI£rE SPL.SETOP" 
PRIWT D$;"0PEN SPL.SBIUP" 
PRIWT D$; "WRITE SPL. SETUP" 
PRIWT "FP" 
PRIWT "RUN LDADAPA" 
PRIWT "POKE 103, ";B + 1 
PRIWT "POKE 104, ";A 

PCKE ";B;",0" 

IflAD ";A$ 

&R 2,1" 
PRIWT "1 POKE 0000,000:POKE 0000,00" 
PRINT "SAVE SPLITPHOG" 
PRIWT "EXE SPL. FINDER" 
PRIWT D5;"CIi3SE SPL.SEIUP" 
PRIWT D5;"EXIC SPL.SBIUP" 



380 
390 
400 
410 
420 
422 
424 
426 
430 
440 
450 
460 
470 
480 
490 



PRIWT 
PRIWT 
PRIWT 



No, 54 - November 1982 



MICRO - The 6502/6809 Journal 



93 



When the RUN SPLIT command is 
issued, you see the following: 



ENTER THE NAME 
GRAM TO SPLIT 
< type in the name > 



OF THE PRO- 



FOR 



ENTER LOMEM ADDRESS 
LOADING PROGRAM 
<Normally this is 2048 (or $0800], but 
you may change this, if you like > 

ENTER 1 IF SPLITTING OVER HGRl 
2 IF SPLITTING OVER HGR2 
IF SPLITTING OVER BOTH 

WHICH; <your choice depending on 
your needs > 



modifications since SPLITPROG does 
not accept modifications gracefully. 

Now I will present the programs and 
support utilities, with a description of 
their execution sequence. 



SPLIT Description 

Lines 180-350 are POKEd away for 
the rest of the utilities to use. Loc's 210 
and 211 are for program start-up loca- 
tion,- 212 and 213 are the addresses for 
the boundaries of the split. 

Lines 370-400 and 580-590 create 
and execute SPL. SETUP, which does 
the following: 



LOAD < program > < loads the 
program > 

<Si.R 2, 1 < renumbers to 

allow a dummy 
line 1 to be 
inserted that will 
be modified > 

1 POKE 0000,000:POKE 0000,00 
SAVE SPLITPROG <this will 
eventually 
become the split 
program > 

EXEC SPL.FINDER <goes off to find 
where to split > 



Then wait as your screen goes 
through some contortions, writing 
messages, etc. Finally it will write out: 
END OF JOB. A program called SPLIT- 
PROG will have been created which, 
when run, will not be interfered with if 
hi-res graphics are used. Be sure to hold 
on to the original program for making 



FP 

RUN LOADAPA 



< cleans things 
up a bit > 
<from Apple II 
Tool Kit > 



POKE 103, <addrl > <set up LOMEM 
POKE 104,<addr> for loading the 
POKE < loo, user program to 
be split > 



Listing 2: SPLIT FINDER 

63980 1=1+ PEEK (210) + PEEK (211) * 256 

63981 J = PEEK (l -t- 1) 

63982 IF J = PEEK (212) THEN 63987 

63983 M = 1:1 = J * 256 + PEEK (I) 

63984 IF I <> THEN 63981 

63985 PRIWT "PROGRAM DOES NOT RE?01 HI(H-RES PAGE" 

63986 END 

63987 POKE 208, PEEK (M + 2): POKE 209, PEHC (M + 3) 

63988 POKE 103, 1: POKE 104, 8: POKE 2048, 

63989 PRINT CHR$(4);"R0N SPL. EXEC MAKER" 
RUN 63980 



Listing 3: SPLIT EXEC MAKER 

5 Y = 36 

6 IF PEEK (213) = 64 THEN Y = 72 

7 Z = PEEK (209) * 256 + PEEK (208) 

8 D$ = CHR$ (4) 

9 PRIWT D$;"OPEN TmPEXBC;" 

10 PRIWT D$r"DEUnE TEMPEXBd" 
20 PRIWT D$,-"OPEN TMPEXEC" 

30 PRIWT D$; "WRITE TEMPEXEC" 

31 PRIWT "POKE 103,PEEK(210)+1" 

32 PRIWT "POKE 104,PEEK(211)" 

33 PRIWT "POKE (PEEK(210)+256*PEEK(211) ) ,0" 

34 PRIWT "ITAD SPUTPROG" 

35 PRIWT "S.R ";Z + 3 + Y;",1,";Z 

36 PRIWr Z;" GOTO ";Z + 3 + Y 

37 PRIWr Z + 1;" REM SPUT" 
40 EDR I=Z + 2TOZ + 2+Y 

50 PRIWr I;" Vm SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT S 
PUT SPLIT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPL 
IT SPLIT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT SPUT 
SPUT SPUT SPUT SPUT SPU" 

60 NEXT I 

65 PRIWr "EXEC SPL.PATCHER" 

70 PRIWT D$; "CLOSE TEMPEXEC" 

80 PRIWr D$;"EXEC TEMPEXEC" 



SPL.FINDER Description 



The EXEC is copied to the end of 
the user program and then that part is 
executed. 

Lines 63980-63984 scan the pro- 
gram to be split to find the statement 
just preceding the hi-res page beginning. 

Lines 63984-63986: if the program 
isn't large enough to require splitting, 
we stop here. 

Lines 63987-63988 POKE away the 
statement number detected for later use. 

Line 63989 invokes the next phase, 
which does the actual splitting process. 



SPL.EXEC MAKER Description 



Lines 5-6 compute the number of 
dummy REM SPLIT statements to be 
inserted to cover the appropriate 
graphics area. 

Line 7 retrieves the line number 
where the split starts. 

Lines 8-80 create and execute 
TEMPEXEC, which performs the 
following functions upon invocation: 

Lines 31-34 set up the appropriate 
LOMEM value and then load 
SPLITPROG. 

Line 35 renumbers the program to 
allow insertion of the REM split 
statements. 

Line 36 adds a GOTO statement 
around the REMs so they can't be 
executed. 

Lines 37-60 add the dummy REM 
statements. 

Line 65 EXECs the final phase of the 
splitting process, which creates the ap- 
propriate POKE for line 1 to relink the 
final program execution. 



94 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Listing 


4: SPLIT PATCHER 


63970 


1=1+ PEEK (210) + 256 * PEEK (211) 


63971 


Jl = PEEK (208) :J2 = PEEK (209) 


63972 


IF ( PEEK (I + 2) - Jl) AND ( PEEK (I + 3) = J2) THEN 63976 


63973 


I = PEEK (I) + PEEK (I + 1) * 256:M = I 


63975 


QOTD 63972 


63976 


K = M 


63977 


J = PEEK (M + 1) 


63978 


IF J - ( PEEK (212) + PE:EK (213)) THEN 63981 


63979 


M - J * 256 + PEEK (M) 


63980 


C30TO 63977 


63931 


PRINT G1R$ (4); "OPEN TEMPEXEE" 


63982 


PRINT CTR$ (4); "DELETE TEMPEXEE" 


63983 


PRINT CHR$ (4); "OPEN TEMPEXEC" 


63984 


PRINT CHRS (4); "WRITE TEMPEXEC" 


63985 


PRINT "1 POKE ";K;","; 


63986 


L = PEEK (M):J = 2: IF L > 9 THEN J = 1 : IF L > 99 THEN 63988 


63987 


PRINT LEET$ ("000", J); 


63988 


PRIWT L;": POKE ",-K + 1;","; PEEK (M + 1) 


63989 


PRINT "PRINT CHR$(4);"; CHR$ (34);"DEIZTE SPL.SEriUP"; CHR$ (34) 


63990 


PRINT "DEL 63970,63995" 


63991 


PRIWT "SAVE SPLITPRX;" 


63992 


PRINT "PRINT "; CHR$ (34)r"END OF JOB"; CHR$ (34) 


63993 


PRINT "PRINT 01R5(4)r"; 01R$ (34); "DELETE TEMPEXEC"; CHR$ (34) 


63994 


PRINT CHR$ (4);"ClJ3eE TEMPEXEC" 


63995 


PRINT CHR$ (4); "EXEC TEMPEXEC" 


RUM 63970 



SPL.PATCHER Description 

The EXEC is copied to the end of 
the user program and then that part is 
executed. 



Lines 63970-63980 compute the ac- 
tual machine addresses before and after 
the split, which must be modified to 
relink the program. 



Lines 63981-63995 create and EXEC 
TEMPEXEC, which does the following: 

Lines 63985-63988 replace the 
initial dummy POKE with the ap- 
propriate POKE for relinking the 
program. 

Lines 63989-63993 clean up 
some of the garbage left by the pro- 
cess, save the final SPLITPROG, and 
print the "END OF JOB" message. 

As you can see, a lot goes on, and a 
number of EXEC files are executed. 
This is mainly for the purpose of mak- 
ing the entire process automatic. I 
welcome any changes or modifications 
that would streamline the process. 



Mr. Berns has been involved in computing 
since 1959, working on large-scale 
computer systems as a systems analyst/ 
programmer . He has written both the 
BASIC compiler and interpreter and the 
LISP system for Stanford University where 
he has been employed for the past 14 
years. He may be contacted at 735 La Para 
Ave., Palo Alto, CA 94306. 

ilMCftO 



Model EP-2A-79 

EPROM Programmer 




TRS-80 

H-8 

H-89 

Ohio 

Scientific 

SWTP 

Aini-65 

Sym-l 



Three years in the field with unsurpassed performance. Software is available for 
the EP-2A-79 for most all of the microcomputers including the popular CP/M, 
FLEX. HDOS operating systems. Write or call for specific hardware/software inter- 
facing. Driver packages available for F-8, 6800. 6809, 8080,8085, Z-80, 1802, 
6502 and 2650 based systems. 



EP.2A79 115V50/60HZ 






....$169.00 


PM-0 TMS2708 


Persona 

$1700 


ity Modules 

PM-5 

PM-5E 

PM-8 

PM-9 

SA-64-2 

SA-64-3 


2716 2758 


$17.00 


PM-1 2704 2708 


17 00 


2816 

MCM68764 .... 

2764 

TMS2564 


35 00 


PM-2 2732 

PM-2A 2732A 

PM-3 TMS2716.... 


33.00 

33.00 

1700 


35.00 

35.00 

39.00 


PM-4 TMS2532 


33.00 


2764 


39.00 



Optimal Technology, Inc. 

Phone (804) 973-5482 
Blue Wood 127 Earlysville. VA 22936 



QCB-9 SINGLE BOARD COMPUTER 



• 6809 BASED 

• RUNS TSC FLEX DOS 

• QCB-9/1 S-100 BUS 

• QCB-9/2 SS-50 BUS 



$149.00 



•PARTIAL KIT 

FEATURES 




• 5V<" Floppy Controller 

• Serial RS-232 Port 

• Centronics Type Printer Port 

• Keyboard /Parallel Port 

• 24K Bytes ol Memory 

• QBUG Resident Monitor 

• 6802 Adaptor 

FULLY ASSEMBLED 

& TESTED $389.00 

• 48-tiour Burn-in 

• 90 Oay Warranty 



NAKED-Og SS-50 6809 CPU CARD 

♦ 1K0FRAM ATE400 Assembled & Tested $149.00 

♦ 6K OF EPROM AT E800-FFFF 2 MHZ Version $189.00 
♦_ HIGH DUALITY OOUBLE SIOEO PCB ♦ SOLDER MASKED * SILK SCREENED 

$150.00 



$49.95* 

PCB 8, 

Documenialion 

Only 



TSC, FLEX DOS, ASSEMBLER, EDITOR 



QBUG RESIDENT MONITOR 

♦ Disc Boot ♦ Memory Test 
■* Memory Exam & Exchange ■* Zero Memory 

♦ Memory Dump * Fill Memory 



$50.00 

* Break Points 

* Jump to User Program 

* Register Display & Cliange 



QBUG IS A TRADEMARK OF LOGICAL DEVICES INC.. ' Copyrighl 1981 

PHONE ORDERS: (30S) 776-5870 

LOGICAL DEVICES INC. 

COMPUTER PRODUCTS D/V/SION 

781 W. OAKLAND PARK BLVD. • FT. LAUDERDALE, FL 33311 

Twx: sio-gss-gige • we accept visa, mc, checks, c.o.d., money order 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



Extra Colors for the Atari 



by Richard I. and Donna M. Marmor 



' ! 



Two techniques are presented to 
achieve extra colors on the Atari 
screen. One uses alternating 
adjacent dots of different colors, 
while the other uses alternating 
displays of different colors. 

Extra Colors 

requires: 

Atari 400/800 (8K) 

Atari graphics modes are limited in the 
number of colors that can be displayed 
at any one time. In Mode 7, for exam- 
ple, only four colors can be used. There 
are many techniques available that will 
expand your choices. In this article we 
describe two of them and provide sam- 
ple program illustrations. 

Color Dot Mixing 

With this technique you place pix- 
els of different colors next to one 
another in an alternating pattern. For 
instance, a red pixel followed by a blue 
pixel followed by a red pixel, and so on. 
In a relatively large bounded area, such 
as a square, the overall perceived shade 
is distinct from the individual colors 
comprising the pattern. Using this ap- 
proach, the number of distinct colors in 
Mode 7 expands to 10: primary colors 
1, 2, 3, and 4; and the "mixed" colors 
1-2, 1-3, 1-4, 2-3, 2-4, and 3-4. Of 
course, you must make a judicious 
choice of the four primary colors so 
that the mixed colors will look good 
and appear distinct. 

Program 1 will help in your explora- 
tion of Color Dot Mixing. It places two 
sets of two squares on a Mode 7 screen, 
one against a white background and 
one against a black background. The 
program then asks you to type in a pair 
of color- luminance combinations. It 
colors a square in each set with each 
color you chose, and then shows you 
the result of the mix in a square directly 
below. Why are there two sets of 
squares? Since colors look different 



Listing 1 

1 REM ««PROGRAM 1** 

2 REM 

3 REM ILLUSTRATES COLOR DOT MIXING 

4 REM YOU INPUT THE COLORS YOU WANT 

5 REM THE PR06RAM THEN DISPLAYS THEM 

6 REM AND MIXES THEM FOR YOU- 

7 REM AGAINST A WHITE AND BLACK BACKGROUND 

8 REM 

10 GRAPHICS 7 

20 SETCOLOR 0,0, 14i COLOR 1 

30 FOR 1-80 TO 159 STEP 1 

40 PLOT I,0lDRAWTO I,79iNEXT I 

S0 PLOT 10, 10 

60 DRAWTO 20,10lDRAWTO 20,203DRAWTO 10,20>DRAWTO 10,10 

70 PLOT 30, 10 

80 DRAWTO 40, 10IDRAWTO 40,20:DRAWTO 30,20sDRAWTO 30,10 

90 PLOT 20,30 

100 DRAWTO 30, 301 DRAWTO 30, 40> DRAWTO 20, 40: DRAWTO 20,30 

110 COLOR 

120 PLOT 90, 10 

130 DRAWTO 100, 101 DRAWTO 100, 201 DRAWTO 90, 20: DRAWTO 90,10 

140 PLOT 110,10 

1S0 DRAWTO 120,10iDRAWTO 120,20:DRAWTO 1 10, 20: DRAWTO 110,10 

160 PLOT 100,30 

170 DRAWTO 110, 301 DRAWTO 1 10,401 DRAWTO 100,40: DRAWTO 100,30 

180 COLOR 2 

190 FOR I-ll TO 19 STEP 1 

200 PLOT I,lliDRAWTO 1,19 

210 PLOT I-t-e0,lliDRAWTO I-i-e0, 19 

220 NEXT I 

230 FOR 1-21 TO 29 STEP 2 

240 FOR J=31 TO 39 STEP 2 

250 PLOT I, J I PLOT 1+80, J 

260 NEXT J I NEXT I 

262 FOR 1=22 TO 29 STEP 2 

264 FOR J-32 TO 39 STEP 2 

266 PLOT I, J I PLOT 1+80, J 

268 NEXT J I NEXT I 

270 COLOR 3 

280 FOR 1-31 TO 39 STEP 1 

290 PLOT I,11:DRAWT0 1,19 

300 PLOT 1+80, 11 1 DRAWTO 1+80,19 

310 NEXT I 

320 FOR 1-22 TO 29 STEP 2 

330 FOR J-31 TO 39 STEP 2 

340 PLOT I, J I PLOT 1+80, J 

350 NEXT J: NEXT I 

352 FOR 1=21 TO 29 STEP 2 

354 FOR J =32 TO 39 STEP 2 

356 PLOT I, J I PLOT 1+80, J 

358 NEXT J I NEXT I 

360 PRINT "First color (0-15), lum<0-14 even)" 

370 INPUT CF,LF 

380 PRINT "Second color (0-15), lum<0-14 even)" 

390 INPUT CS,LS 

400 SETCOLOR 1,CF,LF 

410 SETCOLOR 2,CS,LS 

420 PRINT J PRINT : PRINT 

430 PRINT "First: Color="iCF5" Lum="iLF 

440 PRINT "Second: Color = ";CS;" Luni=";LS 

450 GOTO 360 



96 



MICRO - The 6502/6809 Journal 



No, 54 - November 



against different background colors, we 
decided to experiment with different 
backgrounds. 

You can easily modify this program 
to further enlarge the technique. Why 
not mix more than two colors? Or how 
about different cycles; one red pixel 
followed by two blue pixels, for exam- 
ple? Try background colors other than 
black and white. You'll really see the 
difference! 

The possibilities from color dot 
mixing are great and they are suitable 
for many applications. The resulting 
colors, however, appear rather coarse to 
the eye. The next technique uses dis- 
play list interrupts to create new colors 
that are much purer and far more pleas- 
ing to the eye. 

Color Dot Alternation 

To understand this technique, we 
must first review some Atari display 
theory. When you look at a display on 
your television or monitor, it appears 
almost as if the display is painted on 
the screen. Actually, the display is be- 
ing regenerated by ANTIC, 60 times per 
second. But this is so fast that you 
don't see the resulting flicker. 

An explanation of the display list 
and display list interrupts appears in 
many places, so we won't go into that 
in great detail: just enough to give a 
frame of reference. Every 60th of a sec- 
ond [or frame), ANTIC goes through its 
display list and associated display 
memory, retrieving the color register 
number for a given pixel from display 
memory and displaying the pixel at the 
correct point on the screen in the color 
specified in the appropriate color regis- 
ter. What would happen if, on alternate 
frames, different colors were displayed 
for the same pixel? During frame 1, for 
instance, the color of a pixel might be 
red. During frame 2, it might be blue. 
During frame 3, it would go back to 
red, and so on. The result, according to 
color wheel theory, is that the pixel 
should appear purple. And indeed it 
does. If you kept track which pixels of 
your display should be pure red, which 
should be pure blue, and which should 
be alternating red-blue, you would ob- 
train three pure and distinct colors for 
the price of two! In a Mode 7 display, 
this makes 10 colors a possibility. 

This technique may be imple- 
mented in several ways. Program 2 
demonstrates one way. As in program 
1, program 2 asks you to type in two 
color- luminance combinations. These 
colors are displayed in separate squares, 
and then below them a rectangle is dis- 
played with the colors alternating on 
different display frames. 

The alternation is produced by the 



Listing 2 



1 REM **PROGRAM 2** 

2 REM 

3 REM ILLUSTRATES COLOR DOT ALTERNATION 

4 REM YOU INPUT THE COLORS YOU MANT 

5 REM THE PROGRAM THEN DISPLAYS THEM 

6 REM AND MIXES THEM FOR YOU 

7 REM 

10 QRAPHICS 7 

20 SETCOLOR 4,0,14 

30 PRINT "FIRST CaLOR(0-lS>, LUM<0-14 EVEN)" 

40 INPUT CF.LF 

S0 PRINT "SECOND CaLOR(0-lS>, LUM(0-14 EVEN}" 

60 INPUT CS.LS 

70 SETCOLOR 0,CF,LF 

80 SETCOLOR 1,CS,LS 

90 COLOR 1 

100 FOR I>21 TO 39 

110 PLOT I,21:DRAMT0 I,39:NEXT I 

120 COLOR 2 

130 FOR I-Sl TO 69 

140 PLOT I,21:0RAWT0 I,39|NEXT I 

170 SETCOLOR 2,0,0 

180 COLOR 3 

190 FOR 1-26 TO 54 

200 PLOT I,SltDRAMTO 1, 69a NEXT I 

210 POKE 36770,240 

215 RESTORE 

220 FOR 1-0 TO 39 

230 READ AiPOKE lS36-t-I, AaNEXT I 

240 DATA 72,138,72,169,0,141,10,212 

250 DATA 141 , 24, 208, 169, 20, 141 , 0, 2 

260 DATA 104,170,104,64,72,138,72 

270 DATA 169,0,141,10,212,141,24,208 

280 DATA 169,0,141,0,2,104,170,104,64 

290 POKE 1540, CF«16-t-LFi POKE 1560,CS«16-t-LS 

300 POKE 512, 01 POKE 513,6 

310 POKE 54286, 192 

320 END 



display list interrupt routines shown in 
listing 3. In listing 2, the routines are 
POKEd into memory at lines 220-280. 
When the routines are executed in their 
appropriate frames, the color register 
used for the third square is flip-flopped 
between the two colors you chose. Inur- 
ing the odd frames, the color register is 
set to the first color. During the even 
frames, the color register is set to the 
second color. Each interrupt routine 
causes the other one to execute during 
the next frame by modifying the dis- 
play list interrupt vector. The input 
colors are set into the interrupt rou- 
tines by line 290. The result on the 
screen is that the third square has a dif- 
ferent color than the other two. 

To fully utilize Color Dot Alterna- 
tion, some additional programming is 
needed. You must keep track of which 
pixels are to be mixed and which are 
not. This can be accomplished by using 
multiple display list interrupts in con- 



junction with tables giving the mode 
lines to be mixed. 

The implementation given here 
uses two display list interrupts for 
alternate frames. Another method is to 
use a single display list interrupt that 
flip-flops a color register. You would 
change the contents of the color regis- 
ter during alternate frames. A final 
method, although costly in memory, is 
to have two separate display memories. 
One would contain the color register 
numbers used during the odd frames, 
and the other would contain the color 
register numbers used during the even 
frames. If a pixel is to be a pure color, 
its associated color register number 
would be the same for odd and even 
frames. If a pixel is to be mixed, its 
color register number would alternate 
in the two display memories between 
the two registers to be mixed. A display 
list interrupt would be used to change 
the display list itself to point to the two 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



97 





Listing 3 




DISPLAY LIST INTERRUPT ROUTINES FOR PROGRAM 2 


PHA ODD 


FRAME DLI ROUTINE 


TXA 




PHA 




LDA tt0 


AT RUN TIME CONTAINS FIRST INPUT COLOR 


8TA WSYNC 




STA C0LPF2 


PUTS FIRST COLOR IN COLOR REGISTER 2 


LDA tt20 


SETS EVEN FRAME DLI ROUTINE 


STA •512 


TO EXECUTE DURING NEXT FRAME 


PLA 




TAX 




PLA 




RTI 




PHA 


EVEN FRAME DLI ROUTINE 


TXA 




PHA 




LDA #0 


AT RUN TIME CONTAINS SECOND INPUT COLOR 


STA WSYNC 




STA C0LPF2 


PUTS SECOND COLOR IN COLOR REGISTER 2 


LDA #0 


SETS ODD FRAME DLI ROUTINE 


STA •512 


TO EXECUTE DURING NEXT FRAME 


PLA 




TAX 




PLA 




RTI 





display memory areas for different 
frames. 

One warning about this technique. 
When you alternate between colors of 
different luminances, flickering will 
occur. The flickering will worsen as the 
luminances get farther apart and will be 
almost non-existent when the lumi- 
nances are the same, especially with 
the higher color numbers. This flicker 
effect can be very useful for special ef- 
fects in your programming. 

The expansion possibilities for Col- 
or Dot Alternation seem endless. You 
can experiment with cycles of three or 
more. With a cycle of two, your color 
palette is 256. With higher cycle num- 
bers, the choices are greater, of course. 
We have used the technique effectively 
with cycles of up to four. 

Both Color Dot Mixing and Color 
Dot Alternation are simple techniques 
that expand the color possibilities of 
your Atari. By using these techniques, 
or variations, you can begin to realize 
the full graphics potential of your 
computer. 

Contact the authors at 901 Green Forest 
Drive, Montgomery, AL 36109. 

JMCRO 



APPLE II PERIPHERAL DEVELOPERS: 

Your complex function prototype requires 
the best wirewrap board available. 

SPECTRUM SYSTEMS MAKES IT! 



Fully Extended Wirewrap Protoboard. 

Size: 2.8 by 10.7 inch 2 layer PC. 
Capacity: up to 58-16 pin or12-40 pin 

or any combination soclcets inbetween. 

Carefuliy designed +5 and GND planes provide lor 
the minimum electrical noise, low impedance, hi 
capacitance, and maximum versatility in the layout 
of IC's, capacitors, discretes and I/O connectors. 

Wire-wrap technique documentation included. 

Terms: 

• S45.00 -^ (6% Cal. Res. lax) -^ S2.00 S&H. 

• All payments must lie in U.S. funds drawn on a U.S. 
bank. 

• Outside U.S. add 10%. 

• Cashier check/money order allow 30 day ARC. 

• Personal checks add 2 weeks. 

• No credit cards or cash. Please! 

Spectrum Systems 

PC. Box 2262 

Santa Barbara, Ca. 93120 

Apple II IS a Hademark ol Apple Compulen. 






the LEADER 
of the pack . . 



Write for free catalog with more than 400 fantastic 
values for all your word and data processing needs. 
Outside USA, enclose $1.00 . 

ABM PRODUCTS 

8868 CLAIREMONT MESA BLVD. 
SAN DIEGO, CALIFORNIA 92123 

Toll Free 800-854-1555 Orders Only 

For information or California Orders 

(714)288-3537 



98 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



Introduction to 3-D Rotations 

on the Apple 



by Chris Williams 



The techniques of 3-D rotation 
are discussed. An Applesoft 
demonstration program Is 
provided, which Includes 
general-purpose routines for 
yaw, pitch, and roil. 

ROTATE 

requires: 

Apple with Applesoft 

I am fascinated by the computer-gener- 
ated special effects recently proliferated 
through the film industry. The primary 
building block for these special effects 
is the 3-D rotation. I've discovered that 
these effects are remarkably easy to 
produce; this article and program pass 
on the techniques required. 

The program is written entirely in 
Applesoft and isn't offensively slow, 
but don't expect fluid motion. The pro- 
gram documentation is thorough, but 
you should make two copies (one with 
REMs, one without). Executing the 
REMed program will try your patience. 

I won't provide an in-depth discus- 
sion on the math; you don't need to 
understand it to do rotations. Just strip 
out my subroutines and use them 
where you need them. 

The program draws a hi-res 3-D rec- 
tangular box and then rotates it. The 
rotation occurs in discrete steps of 15 
degrees. It takes about 90 seconds to 
rotate through 360 degrees. 

This box is a real-world object — it 
has height, width, and depth. The task 
in doing 3-D display is to project real- 
world objects onto a two-dimensional 
surface. 

Figure 1 is the Apple hi-res screen 
for X and Y. Z is supposed to be an axis 
drawn out of the screen and perpen- 
dicular to it. Since that can't be done, 
represent Z as a line drawn at a 
45-degree angle, upper left to lower 
right. This line allows you to put depth 
on the screen. 

Figure 2 introduces the box and 
shows how the 3-D to 2-D projection 
works. Notice that the comers of the 



object are numbered points. They cor- 
respond to the CR array in the program. 
This array is dimensioned (3,8). The 
object has eight comers and each comer 
has three elements representing X, Y, 
and Z coordinates. Lines 170 through 
400 of the program simply define the 
box in 3-D space. 

Now you need to project it onto the 
2-D plane. X and Y coordinates corres- 
pond precisely so they pose no problem. 
The Z coordinate is another matter. 

Since Z is defined to be at 45 degrees 
to both X and Y, then the Z coordinate 















\U L_LL_IJ 


1 






rigure i 




























\ 






































\ 






































\ 






































\ 






































\ 






































\ 






































\ 






































s 
















■^ 






















^ 








Y AVIO 
























\ 










lO 


























\ 






































\ 






































\ 






































\ 


















[ 














,,\ 


^ 














Y-AXiS 


> 


/ 






Z-AAItJ 
















_ 


_ 












_ 


_ 


_ 







is related to X and Y as X = sin(45)*Z, 
Y = sin(45]»Z. Sine and cosine of 45 
degrees are both .707. Specify a comer's 
position in 3-D space as CR(1,I), 
CR(2,I), and CR(3,I) where I selects the 
comer and 1,2,3 is XYZ. A comer's 2-D 
projection onto the X-Y screen is com- 
puted in lines 490 and 500 using 
X = X+.707.Z, Y = Y+.707»Z. Lines 
510 and 520 are there merely for scaling 
and putting the box near the center of 
the screen. 

The edges of the box are defined 
even more simply. They are in a table 
look-up contained within arrays II and 
12. Notice that both these arrays are 
dimensioned as 12 as there are 12 edges 
on the box. 

The number in each element of 
these arrays is a comer (see figure 2). 
That means an edge exists from point 
11(1) to point 12(1). If you look at lines 
550 through 590, you'll see HPLOT 
draws an edge from X(I1(I)),Y(I1(I)) to 
X(I2(I)),Y(I2(I)). 

That's all it takes to draw a 3-D 
box. You can convince yourself of this 
by turning off the rotation in the pro- 
gram (insert line 455 GOTO 480). This 
will display the box in X,Y. 

Now take out the GOTO and try 
rotating. Here, the problem is again one 




No, 54 - November 1982 



MICRO - The 6502/6809 Journal 



99 




of axis definition. Refer back to figure 1 . 
Call rotation about the Z axis — Roll, 
about the X axis — Pitch, and about the 
Y axis — Yaw. The program does a Yaw 
rotation only. 

The trick is in the matrix multiply. 
If you let a given corner's coordinates 
beXl,Yl,Zl, then 



= ROTATION MATRIX] X( Y1 



where X2,Y2,Z2 is that point's new, 
rotated coordinates. 

If you don't understand that, don't 
worry. You'll be able to just plug 
numbers; you won't need to under- 
stand it. 

The rotation matrix above is defined 
in lines 620 through 720. The angle for 
the sine and cosine call comes from 
line 450 where degrees are incremented 
by 15 each time through the loop and 
then converted to radians. 

The choice of where the sine and 
cosine terms go in the rotation matrix 
determines whether the rotation is 
Roll, Pitch, or Yaw. Looking at the pro- 
gram, see that for Yaw 



DIM RT{3,3) = 



c(Yaw) 
0.0 
- s{Yaw) 



0.0 
1.0 
0.0 



s(Yaw) 
0.0 
c(Yaw) /■ 



How to run a listing in 
MICRO'S Software/Hardware 

The Software and Hardware 
Catalogs are provided as a ser- 
vice both to our readers and to 
the manufacturers. These entries 
are not MICRO reviews, but 
descriptions provided by the 
manufacturer. 

To run a free listing in either 
catalog, a company fills out the 
appropriate form or merely mails 
in their material in the same 
format that appears In the 
magazine. 

We try to limit entries to one 
company per month, on a flrst- 
come-first-serve basis. 

If you sell products our 
readers should know about, write 
to Software/Hardware Catalog, 
MICRO, P.O. Box 6502, 
Chelmsford, MA 01824. 



Listing 1 



RfW 
REM 
REM 

nm 

RIM 
REM 



ROTOTE TUTORIAL 
BY C. WIU.I.V1S 
COPYWICHT 1982 
BY C. WILLI V« 



10 DIM CO(3),C(3) 

20 DIM 11(12), 12(12) 

30 DIM FT(3,3) 

40 DIM CRNR(3,fl) 

50 DIM XP(8),YP(8) 

60 DIM D(3) 

65 REM READ EDGE-START POINTS INTO II 

70 FOR I = 1 TO 12 

90 READ A 

90 IKI) = A 

100 NEXT 

110 DATA 1,2,3,4,5,6,7,8,1,2,3,4 

115 REM RB^D EDGE-END POI»TrS ITOD 12 

120 TOR I = 1 TO 12 

130 REM) B 

140 12(1) = B 

150 DATA 2,3,4,1,6,7,8,5,5,6,7,9 

160 ^^EXT 

165 REM DEIFINE 3-D POSITION OP CORNERS 

170 CRNRd.l) = 0. 

180 CRNR(2,1) = 0. 

190 CRNR(3,1) = 0. 

200 CRNR(1,2) = 0. 

210 CR»IR(2,2) = 1. 

220 CRNR(3,2) = 0. 

230 CRNR(1,3) = 1. 

240 CRNR(2,3) = 1. 

250 CRNR(3,3) = 0. 

260 CRNR(1,4) = 1. 

270 CRNR(2,4) = 0. 

280 CRNR(3,4) = 0. 

290 CRNR(1,5) = 0. 

300 CRNR(2,5) = 0. 

310 CRNR(3,5) = 2. 

320 CRNR(1,6) = 0. 

330 CRNR(2,6) = 1. 

340 CRNR(3,6) = 2. 

350 CRNR(1,7) = 1. 

360 CRNR(2,7) = 1. 

370 CRNR(3,7) = 2. 

380 CRNR(1,8) = 1. 

390 CRNR(2,8) = 0. 

400 CRNR(3,8) = 2. 

405 REM LINE 410 SETS VARIABLES ETIR SPEED 

410 P7 = .707!OE = l:V:l = 2:TR = 3:TT = 30!SF 

420 F1C0I£)R= 3 

430 HOME : VTAB 5: INPtrr "ENTER INITIAL ROTATION ANGU! 

440 RAD = 3.14159 / 130. 

445 REM TIE UXyP BEGINS '1ERE WITM ANGLE INCREMENT 

450 AG = AG + EV;AG = AG * RAO 

460 QOSUB 620: REM RT DEFINED 

470 OOSUB 740: REM MATRIX MULTIPLY 

475 REM TlIS LOOP DOES TIE 3-D — >2-D PROJETTION, PLUS SCREEN SCALING 

480 FDR I = OE TO EI 

P7 * CRW(TR,I) 

P7 * CRNR(TR,I) 

+ <W 

+ SF 



75;FV = 15:EI = a-.'iU = 150 



";AG 



490 XP(I) 

500 YP(I) 

510 XP(I) = (XP(I) 

520 YP(I) = (YP(I) 

530 NEXT 

535 RJM 

540 -IGR 

545 RIM 



= CRNR(OE,I) + 

= CRNR(W,I) + 

TT) 

TT) 



ERASE OLD BOX, FULL SCREEN 
: POKE - 16302,0 

CRAW IT, PUK TIE EDGES 
550 FOR I = 1 TO 12 
560 PI = iKl) 
570 P2 = 12(1) 

580 HPinr XP(P1),YP(P1) TO XP(P2),YP(P2) 
590 NEXT 
600 GOTO 450 
610 END 

615 REM SUBROtrriNE AT 620 DEFINES RT 
620 CANGLE = OOS (AG) 
630 SANGI£ = SIN (AG) 
640 FOR I = I TO 3 
650 FOR J = 1 TO 3 
660 RT(I,J) = 0. 
670 NEXT J: NEXT I 
680 RT(1,1) = CANGLE 
690 RT(2,2) = 1, 
700 RT(3,3) = CANGLE 
710 RT(1,3) = SA.NGLE 



(contini 



100 



MICRO - The 6502/6809 Journal 



No. 54 - November II 



Listing 1 (continued) 

720 Ffr(3,l) = ( - SANGLE) 

730 REITJRN 

735 REM SUBROUTINE AT 740 DOES X,Y,'7. GCT 

740 FDR I = OE TO EI 

750 FDR J = OE TO TR 

760 C(J) = CRMR(J,I) 

770 MEXT J 

780 OOSUB 840: REM >M3 

790 CRNR(OE,I) = cr)(OE) 

800 CRNR(TW, I) = CX)(TW) 

810 CRNR(TR,I) = cr)(TR) 

820 fJEXT : RETURN 

830 EJTO 

835 REM LIVE 840 STARTS THE y^^TRIX MULT. 

340 FDR K = 1 TO 3 

850 D(K) = 0. 

860 NEXT K 

870 FDR II = OE TO TR 

880 TOR J = OE TO TR 

890 D(II) = 0(11) + RT(II,J) * C(J): NEXT J 

900 NEXT II 

910 TOR II = OE TO TR 

920 CO(II) = D(II) 

930 NEXT II 

940 RETURN 



If you'd like to do Pitch rotations, 
rearrange the array to look like this: 



And for Roll rotations, like this: 



DIM RT(3,3) = 



0.0 0.0 

c(Pitch) - s(Pitch) 
s(Pitch) c(Pitch) 



DIM RT(3,3) = 



c(Roll) 
-s(Ro!l) 
0.0 



s(Roll) 
c(Roll) 
0.0 



0.0 
0.0 
1.0 



If you don't know matrix algebra, it 



doesn't matter. Just rearrange lines 680 
through 720 to produce arrays as shown 
above and you can rotate any way you 
wish. 

That's all there is to 3-D rotation. I 
cringe as I say that because there are all 
sorts of things to be reckoned with. Re- 
fraction, shading, and hidden lines and 
objects are not topics to be discussed in 
an article with a title like this one. But 
the program here is a good foundation. 

There is room for improvement, of 
course. The more adventuresome 
readers might try defining other 3-D 
shapes and then rotating them. The 
subroutines are all there. Or you might 
work for speed; a more fluid update 
would certainly be a plus. Let me know 
what you come up with. 



Mi. Williams is an electrical engineer/ 
writer. He may be contacted at 5676 S. 
Meadow Lane #101, Ogden, UT 84403. 

JMCftO 



Uacision 
Oystems 



O«ci«ion Syit«mi 

P.O. Box 13006 
O«nton, TX 76203 



SOFTWARE FOR THE APPLE II* 

ISAM-DS is an integrated set of Applesoft routines tfiat gives indexed file capabilities 
to your BASIC programs. Retrieve by key, partial key or sequentially. Space from 
deleted records Is automatically reused. Capabilities and performance that match 
products costing twice as much. 
$50 Disk, Applesoft. 

PBASIC-OS is a sophisticated preprocessor for structured BASIC. Use advanced 
logic constructs such as IF. .ELS£ .., CASE. SELECT, and many more. Develop 
programs for Imeger or Applesoft. Enjoy the power of structured logic at a fraction of 
the cost of PASCAL 
»3S. Disk, Applesoft I48K, ROM or Language Card). 

OSA — OS IS a dis-assembler fo' 6502 code. Now you can easily dis-assemble any 
machine language program for the Apple and use the dis-assembled code directly as 
input to your assembler Dis-assembles instructions and data. Produces code com- 
patible with the S-C Assemtiler (version 4 01, Apple's Toolkit assembler and others. 
»2S Disk. Applesoft (32K. ROM or Language Catdl 

FORM-DS is a complete system tor the definition of input and output froms. FORM- 
OS supplies the automatic checking of numeric inout for acceptable range of values, 
automatic formatting of numeric output, and many more features 
»2S Disk. Applesoft I32K. ROM or Language Card) 

UTIL-DS IS a set of routines for use witti Applesoft to format numeric output, selec 
lively clear variables (Applesolfs CLEAR gets everything), improve error handling, 
and interface machine language with Applesoft programs Includes a special load 
routine for placing machine language routines underneath Applesoft programs 
S25 Disk, Applesoft 

SPEED-DS IS a routine to modify the statement linkage in an Applesoft program to 
speed Its execution improvements ol 5-20^o are common As a bonus, SPEED-DS 
includes machine language routines to speed string handling and reduce the need fo' 
garbage clean-up. Author Lee Meador 
»15 Disk, Applesoft (32K, ROM or Language CardI 



(Arid M.OO (or Foiaign Mail! 
'Apple II is a registered trademark of the Apple Computer Co 



PET/CBM 

SOFTWARE 



TM 



8032 

DISPLAY 



OR 



4032 

DISPLAY 



FROM THE KEYBOARD OR PROGRAM 
NOW RUN WORD PRO 3 OR WORD PRO 4 

FROM THE SAME MACHINE 

Available for either 4000 or 8000 Series 

ALSO: 
For 2001 / 3000 Series Computers 

Operate thiese Models in a Full 8032 Like 

Display For Word Pro 4* 

and all other 80 Column Software 

All installation instructions included. 

EXECOM CORP. 

1901 Polaris Ave. 
Racine, Wl 53404 
Pin. 414-632-1004 

PET/CBM a trademark of Commodore Business Machines 
*trademark of Professional Software, Inc. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



101 







201 8389027 



THE TACKLER" 



DUAL • MODE PARALLEL INTERFACE FOR 

THE APPLE* 

2 BOARDS IN ONE FOR NO MORE 

COMPATIBILITY PROBLEMSI 

An intelligent board to provide easy control of your 

printer's full potential. Plus a standard parallel 

board at ttie flip of a switcfi - your assurance of 

compatibility with essentially all software for tfie 

APPLE*. Hires printing witfi simple keyboard 

commands tfiat replace fiard to use software 

routines. No disks to load. Special features include 

inverse, doubled, and rotated grapfiics and many 

text control features, available tfirougfi easy 

keyboard or software commands. 

If s simple to print HIRESgrapfiicsfrom an APPLE computer witfiTfielackler 

from TYMAC. Tfiis is tfie first truly universal parallel interface! Plus tfie ROM 

for your specific printer. Sopfiisticated intelligence wfien you need it, total 

compability tfiat never lets you down. 

Cfiange printers - no need to buy anotfier board. Just plug in one of our 

ROM'S and you're all set ROM'S available for Epson, C. Itofi, NEC, and 

Okidata - otfiers available soon. 

You've asked us to make the TACKLER better than the others and we 

did $159.00 1 




UPGRAOEABLE 
PARALLEL PRINTER CARD 

A Universal Centronics type parallel printerboard 
complete witfi cable and connector. Tfiis unique 
board allows you to turn on and off tfie fiigfi bit so 
tfiat you can access additional features in many 
printers. Easily upgradeable to a fully intelligent 
printer board witfi grapfiics and text dumps. Use 
witfi EPSON, C ITOH, ANADEX STAR-WRITER, 
NEC. OKI and otfiers witfi standard Centronics 
configuration. $139.00 



THE PERFORMER PRINTER 
FORMATTER BOARD for Epson, OKI, NEC 
8023, CITOH 8510 provides resident HIRES 
screen dump and print formatting in firmware. 
Plugs into Apple slot and easy access to all 
printer fonts tfirougfi menu witfi PR# command. 
Use witfi standard printercards to add intelligence. 
$49.00 specify printer. 




THE MIRROR FIRMWARE FOR NOVATION APPLE CAT ll" 

Tfie Data Communication Handler ROM Emulatessyntax of anotfier popular 
Apple Modem product witfi improvements. Plugs directly on Apple CAT II 
Board. Supports Videx and Smarterm 80 column cards, toucfi tone and rotary 
dial, remote terminal, voice toggle, easy printer access and mucfi more. 
List $39.00 Introductory Price $29.00 



DOUBLE DOS Plus 

A piggy-back board tfiat plugs into tfie disk-controller card so tfiat you can 
switcfi select between DOS 3.2 and DOS 3.3. DOUBLE DOS Plus requires 
APPLE DOS ROMS. $39.00 



NIBBLES AWAY II 



AGAIN! Ahead of all others. 
AUTO-LOAD PARAMETERS . . . Free's the user from having to 

Manually Key in Param values used with the more popular software 

packages available for the Apple II. 
EXPANDED USER MANUAL . . . incorporates new Tutorials for 

all levels of expertice; Beginners Flowchart for 'where do I begin' to 

'Advanced Disk Analysis' is included. 
TRACK/SECTOR EDITOR . . .An all new Track/Sector Editor, 

including the following features: Read, Write, Insert Delete Search, 

and impressive Print capabilitiesi 
DISK DIAGNOSTICS . . . Checks 

such things as: Drive Speed, Diskette 

Media Reliability, and Erasing Diskettes. 
HIGHEST RATED . . . Best back up 

Program in Softalk Poll (Rated 8.25 

out of 10). 
CONTINUAL UPDATES. . .Available 

from Computer Applications and new _ 

listi ngs on the source. " jjrjjcppY_ 




$69.95 



Super PIX HIRES SCREEN DUMP 

The Software package that will allow your printer to dump page 1 or page 2 of 
the Apple Hires screen horizontally or vertically Use with EPSON* MX-80 
with or without GRAFTRAX* Roms, MX-70 - OKI* Microline 80, 82, 83, 82A, 
83A- C. ITOH* 8510 and NEC 8023A Requires Tymac Parallel Printer 
Board PPC-1 00... $24.95. 



APPLE LI NK-A versitile modem utility that provides the Apple user the 

ability to transfer disk files and software over the phone. Only one package 

needed for full transfers. Compatable with all DOS file types. $59.00 

(requires Hayes Micro Modem) 



TH E APPLE CARD-Two sided 1 00% plastic reference card Loaded with 
information of interest to all Apple owners. $3.98 

NMi.,.,.^1 /MICRO-H^RE DIST. INC. 

^■S™fv"v^y ''° ^°' "-^ POMPTON PLAINS, N.J. 07444 

^^^^^ Dealer and Distributor Inquires Invited. 



LOCI = *7C8e 



10 PC = «3FC7 



20 LABL: STEP 103 NODISP 



38 IF X<*3E OR @L0C1««I7 THEN GOTO LABL 



40 PRINT "HERE IS THE CULPRIT" 



50 SHOW<100 



PTD-6502 is a high speed, compiled BASIC-like lan- 
guage, light years ahead of the Apple II Single Stepper 
and far more sophisticated than any other 6502 de- 
bugger available. It allows you to sit back effortlessly 
while your computer glides through your code at a thou- 
sand instructions per second looking for your bugs. Or 
you can select a slower speed with updated display of 
memory. A paddle-controlled single stepper mode is 
also available. At either of the slower speeds, the 
PTD-6502 monitors and saves the last 1 28 instructions 
executed for review at any time. 

Virtually unlimited breakpoint complexity is per- 
mitted with the PTD-6502. IF statements with mixed 
AMD's and OR's can be created to test conditions such 
as memory change, memory = value, Instruction loca- 
tion, . . . and many others. You can have as many named 
breakpoints as you wish in both ROM and RAM. 

Some other features of the PTD-6502 include • Fast 
subroutine execution. • Hex calculator/converter 

• Hex/ASCII memory dump. • Up to 16 machine lan- 
guage cycle timers. • Ability to monitor specific labeled 
areas in memory while stepping. • Effective address. 

• Accessible monitor commands. • A documented mod- 
ule for relocation of the PTD-6502 to virtually any loca- 
tion (source code supplied). 

The debugging program shown on the monitor Is a 

simple example; it could be far more complex. If you can 
think of it, you can probably scan for it at 1 000 Instruc- 
tions per second. If you're a professional, the PTD-6205 
can pay for itself in the first few hours of use. If you're a 
novice, you'll soon be debugging like a pro. 



ORDER: PTD-6502 Debugger 

including DOS 3.3 Disk 

and instruction manual 



$49.95 



(Note that disk is not copy protected. Order only 
one for each business or institution.) In Califor- 
nia, add 6.5% sales tax. 
PTD-6502 requires Autostart ROM for fast breakpoint. 

PTERODACTYL 
SOFTWil^® 

1452 Portland Ave. • Albany GA 94706 • (41 5) 525-1 605 




102 



MICRO - The 6502/6809 Journal 



No. 54 - November 19( 



/MCftO 

From Here to Atari 



By Paul Swanson 



We aie pleased to intioduce out new 
Atari Column. Paul Swanson has pub- 
lished aiticles in several miciocom- 
putei magazines and has authored a 
book on disk techniques. He runs his 
own software consulting firm and 
markets a full-size keyboard for the 
Atari 400. 

The Atari has two microprocessors in- 
stead of one, unlike what you would 
find in most systems. The main pro- 
cessor is the 6502. Atari, Inc., custom- 
made the second processor, ANTIC, 
which is used to control just the 
graphics screen. A few other custom 
chips in the Atari are not full micro- 
processors, but you can control them 
through the hardware registers. 

Taking advantage of all the Atari's 
special hardware can be quite com- 
plicated. Fortunately, because of the 
various graphics modes available, 
much of this hardware can be accessed 
through BASIC without knowing very 
much about the hardware itself. 

You can write simple programs 
using the information in the BASIC 
Reference Manual supplied with the 
BASIC cartridge. More complex pro- 
grams that take advantage of Atari's 
special chips require more information. 
I will supply you with details of this 
special hardware in upcoming columns. 

Each month's column will focus on 
some feature of Atari's hardware. I in- 
tend to take these topics from letters I 
receive, so if you have questions or need 
more information on a specific func- 
tion, send me a letter at 97 Jackson St., 
Cambridge, MA 02140. (If you don't 
want your name mentioned, be sure to 
note that in your letter. I will include 
excerpts from letters in my columns.) 

In addition to answering questions 
concerning the Atari, this column will 
also contain information on new hard- 
ware and software from Atari and other 
manufacturers. Already available from 
second sources are memory boards for 
both the 800 and the 400. The 32K 
board (for both) has been available from 
several different companies for over a 
year now. There is also 48K on a single 
card that you can plug into your 400. 



I've heard of a 64K board but haven't 
seen it yet. The Atari can't address 64K 
directly because of the 16K reserved for 
the operating system ROM and the 
hardware registers. The 64K board is 
bank-selectable so it doesn't exceed the 
48K allowed. Available pseudo disks 
give you 128K of memory that you can 
access as if it were a disk. 

Many new products have been an- 
nounced for the Atari, and many are 
about to be announced. Much of the 
new software available is in response to 
Atari Inc.'s interest in home educa- 
tional applications. My First Alphabet, 
by Fernando Herrera, is still one of the 
best educational software packages 
available for younger children. A new 
program called Master Type, from 
Lightning Software, makes an interest- 
ing spaceship game out of learning 
touch typing. If you want to learn how 
to type, you may want to get your local 
computer store to demonstrate this 
program for you. It is listed at $39.95, 
requires 32K and a disk drive, and 
keeps your interest with 17 levels of 
complexity. These two software 
packages, as well as the memory 
boards, are available at most computer 
stores that carry Atari. 

This column, on occasion, will try 
to clarify conflicting rumors. For exam- 
ple, I have heard three or four people 
asking about the "special vector" you 
can use in the Atari to get rid of the key 
click. I can appreciate the need for 
eliminating that noise — it seems much 
louder when everyone else is asleep — 
but I disassembled part of the operating 
system looking for the keyboard click 
and found no place to POKE anything 
that would eliminate it. The part in 
question is in ROM and you can't alter 
ROM with a POKE. It doesn't check 
with any RAM locations before the JSR 
(Jump to SubRoutine) that produces the 
click. The only ways I can see to 
eliminate the click include physically 
disconnecting the keyboard speaker or 
writing your own keyboard handler. 
Even writing the keyboard handler 
would not eliminate the click under 
every possible condition; you have to 
initiate the handler every time one of a 
variety of different things happens. 

Future columns may also include a 
listing of a short utility program 
(BASIC) that is in the public domain. No 



machine-readable copies will be avail- 
able. If you really don't want to type it 
in, check with your local user group to 
see if anyone already typed it in. 

My December column will feature 
the Atari Regional Software Acquisi- 
tion Centers; January will include 
available technical literature. Decem- 
ber's column will be of particular in- 
terest if you plan to market any of your 
Atari software. January's topic covers 
places where you can find lists and ex- 
planations of all those special memory 
locations that you need to develop fan- 
cier software. 

iMCftO 



It Pays 
to Write 
for MICRO! 

Get paid for your ideas: 
write for MICRO! Thousands 
of people read MICRO every 
month. MICRO is sold in 
computer stores and on 
newsstands worldwide. Send 
for a copy of our Writer's 
Guide now. Our author 
payment rate is competitive 
with the leading magazines In 
the industry. 

We welcome articles on any 
aspect of 6502/6809/68000 
hardware and software for the 
Apple, Atari, CBM/PET, 
TRS-80 Color Computer, VIC, 
OSI, 6809, or 68000. Topics for 
upcoming issues are: 
Programming languages 
(besides BASIC), 
Communications, Operating 
Systems, and new Computers. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



103 



Wiat's ealing 

your Apple? 



Find out with Apple-Ciiiin II™ 

It's a fact of computer life. Software and 
hardware interact. If there's a problem eating 
your Apple, you can spend hours trying to 
find out whether software or hardware is the 
culprit. Unless you have Apple-Cillin II. 
Apple-Cillin II is a comprehensive diagnostic 
system developed by XPS to check the 
performance of your Apple II computer 
system. Apple-Cillin II contains 21 menu 
driven utilities to thoroughly test the operation 
of your system, and either identify a specific 
problem area or give your system a clean bill 
of health. Quickly and easily. 
Apple-Cillin II works with any 48K Apple 
system equipped with one or more disk 
drives. 

To order Apple-Cillin II - and to receive 
information about our other products - Call 
XPS Toil-Free: 1-800-233-7512. In 
Pennsylania: 1-717-243-5373. 
Apple-Cillin II: $49.95. PA residents add 6% 
State Sales Tax. 



XPS 



XPS, Inc. 

323 York f^oad 

Carlisle, Pennsylvania 17013 

800-233-7512 

717-243-5373 



NEW SOFTWARE 

for TRS 80 Model III 

and the Color Computer 



■ Church Contribution System 

designed to simplify and facilitate the tedi- 
ous chore of recording envelopes. Provides a 
variety of reports. Maintains its own data- 
files. Only $150 

■ Data Base Manager 

designed to help organize all your data and pro- 
vide you with meaningful reports. Add or delete 
any information. New files can be created and 
old information transferred. Only $150 

■ Single Entry Ledger 

designed as an uncomplicated control of 
finances for home or small business. Add, de- 
lete, edit at any time. Compatible with 
DBM. Only $95 

Write or phone for complete software price list. 





VISA' 



2457 Wehrle Drive 
Amherst, NY 14221 
716/631-3011 



CSE means OSI 

Custom After Market Software 
for C1P and C4P machines 



'Basic Enhancer: 

Renumber, Auto Sequencer, Screen Control func- 
tions, and tape 1/0 system that is faster and has file 
names 

CIP $21.95 

CAP $29.95 

Modified Monitor Rom Chip: 

Now get indirect jump-capabilities just like those 
in the CIP and for no extra charge CSE will burn in 
your machines serial number $16.95 

'NOTE: The G4P version of the Basic Enhancer in- 
cludes the modified monitor Rom chip required for 
proper program functioning. 

This is only a partial listing of our products. Write us 
for information on new disk programs or send $2 for 
catalog. Please include $2.00 shipping and handling 
with orders. 

Computer 

Science 

Engineering 

Box 50 • 291 Huntington Ave. Boston 02115 



Apple II is 3 fradsmart ot AppJe Computer Inc 



104 



MICRO - The 6502/6809 Journal 



No. 54 - November 1S82 



AMCRO 



Dr. William R. Dial 
438 Roslyn Avenue 
Akron, OH 44320 



6809 Bibliography 



78. Color Computer News, Issue No. 10 (July, 1982) 

Jackson, Jesse W,, "TTYPELOG," pg. 58-60. 

A utility for the Color Computer to log tape infonnation to 

your printer. 
Rouse, Alan, "Mortgage," pg. 62-64. 

A "What If" program for the Color Computer. 
Eichman, Steve, "Shaplist," pg. 65-67. 

An Inventory/ File program for the 6809-based Radio Shack 

Color Computer. 
Aker, Jack L., "BASIC Program Line Mover," pg. 69-70. 

A utility for a Color Computer with Extended BASIC, and 

16K or 32K memory. 

Becus, Georges A., "TRACETXT Listing Produced by PRIN- 
TXT CTRACE," pg. 71-75. 

A trace utility for the 6809-based Color Computer. 
Pretty, Richard, "A Pull on Your 'Art' Strings," pg. 11 . 

A simple string art program for the TRS-80 Color Computer. 
Barnes, Mark, "Gold Mine," pg. 78-81. 

A graphics maze game for the 6809-based Color Computer. 
Wright, Darrel, "Convert That File," pg. 83-84. 

A utility program to convert a Telewriter text file to a standard 

ASCn data file or vice versa. For the TRS-80 Color Computer. 
Peterson, Russell M., n, "Exploring Graphics Modes," pg. 87-88. 

Using the SDS80C Editor/Assembler on the TRS-80 Color 

Computer. 

79. 80-U.S. Journal, 5, No. 7 (July, 1982) 

Roberts, R.N., "Togetherness," pg. 88-89. 
Tape merge for the 6809-based TRS-80 Color Computer. 

Causer, R. Shane, "17K of RAM," pg. 94-95. 
Squeeze extra space from memory on your TRS-80 Color 
Computer. This is done by saving IK of memory out of a pro- 
gram requiring 16K of memory. 

80. The Rainbow, 2, No. 1 (July, 1982) 

Parkman, Bob, "Silent Answer," pg. 4. 

A driver to interface a TI Silent 700 with the 6809-based 

TRS-80 Color Computer. 
Mir, Jorge, "Let's Go On A Simple Rainbow Adventure," pg. 
9-17. 

An adventure-type program for the Color Computer. 
Blyn, Steve, "Design Programs to Help Children Learn," pg. 
18-19. 

BEEPEROO is a simple program for the Color Computer 

which can be used to reinforce the concept of simple addition 

of three-digit numbers. 
Penrose, Paul, "Playing Around With Your 80C," pg. 22. 

Playing music with the TRS-80 Color Computer. 
Morgan, Alan J., "Synchronizing with Your SAM Chip," pg. 
24-25. 

Using the 6883 SAM chip with the 6809-based Color Computer. 
Nolan, Bill, "Make Magic Rings on Magic 80C," pg. 27-29. 

For addicts of fantasy role-playing programs, this Color Com- 
puter listing rolls up magic rings for you. 
Rutledge, E.P., "Disk File Helps You Keep Track of Every- 
thing," pg. 30-33. 

A utility for the 6809-based Color Computer. 
Lewandowski, Dennis S., "Let's Soak Up Some Assembly," 
pg. 38-39. 

A second tutorial on 6809 assembly-language programming. 
Ebbert, Jim, "Is There Any Escape from No Escape?", pg. 42-45. 

A space-navigation graphics program for the Radio Shack 

TRS-80 Color Computer. 



Waclo, John, "The NFL Report Can Choose This Fall's Win- 
ners," pg. 50-64, 

Put the National Football League on your Color Computer. 

81. Compute! 4, No. 1 (January, 1982) 

Mansfield, Richard, "BRANCH NEVER and QUIF Assembling 
on SuperPET," pg. 146-149. 
An instructional article for SuperPET users. 

82. Microcomputing, 6, No. 8 (August, 1982) 

Whitman, James A., "Pascal and BASIC Square Off, Con- 
tinued," pg. 22. 

Benchmark tests including data on the 6809-based TRS-80 

Color Computer. 

83. MICRO, No. 51 (August, 1982) 

Steiner, John, "Interfacing the Color Computer," pg. 33-36. 
Circuits to interface the TRS-80 Color Computer to an 
RS-232 port and a motor control relay are presented. A Morse 
Code send/receive program is included as a demonstration. 

Staff, "MICRO Reviews in Brief," pg. 39-41. 
Reviews include discussion of a disassembler for the 6809 
and the Compuvoice Synthesizer for the 6809-based Color 
Computer. 

Dial, Wm. R., "6809 Bibliography," pg. 118. 
Some 26 items relating to 6809 literature are listed. 

84. 80 Micro, No. 52 (September, 1982) 

Miller, Franklyn D., "The Colorful Computer — Part 11," pg. 
152-162. 

Twenty programs for the 6809-based TRS-80 Color Computer. 
Tucker, Richard, "Cheaper Upgrade," pg. 186-188. 

Do it yourself and save substantial cost in converting a 4K 

Color Computer, 8K Color BASIC to a 16K Extended Color 

BASIC by installing the new ROM yourself. 
Norman, Scott L., "Pascal Goes Color," pg. 198-202. 

Compiled Pascal for the Color Computer is discussed. 
Sprouse, Gerald, "Joystick Paintbrush," pg. 230-232. 

Use the Color Computer like a drawing board, employing 

two programs listed. 
Osborne, Frank H., "Conversion," pg. 238-240. 

Rewrite Level n BASIC programs to run on the 6809-based 

Color Computer. 
Heusinkveld, John, "PCLEAR 0," pg. 282. 

Make hi-res graphics use high memory on the 6809-based 

Color Computer. 

85. Personal Computer, 5, No. 8 (August, 1982) 

Curtis, Mike and Whelan, Joe, "The Dragon," pg. 112-116. 
Dragon 32 is a new 6809-based British microcomputer with 
full color, 32K RAM, 16K Microsoft BASIC, etc. 

86. Color Computer News, Issue No. 11 (August, 1982) 

Morrow, Ken, "Program Relocation," pg. 19-21. 

Discussion and listing for program relocation on the 

6809-based TRS-80 Color Computer. 
Bassen, Howard, "Optimizing High-Resolution Animated 
Games in Extended BASIC — Part 2," pg. 23-26. 

Tutorial on the use of game routines with several demo 

listings. 
Lester, Lane P., "Motion Picture Programming and the 
Teacher," pg. 27-28. 

Animation on the Color Computer. JMCftO 



No. 54- November 1982 



MICRO - The 6502/6809 Journal 



105 



/MCftO 

Software Catalog 



Name: Adventure to 

Atlantis 

System; Apple II 
Memory: 48K 
Language: Machine Code 
Hardware: One disk drive 
Description: This game com- 
bines the best features of 
adventure games, arcade 
games, and fantasy role- 
playing games. Adventuie to 
Atlantis is a sequel to Odyssey: 
The Complete Adventure. The 
struggle between the forces of 
magic (The High One) versus 
the forces of science |The 
Atlanteans] continues. The 
game uses four methods to 
grab the player's attention: 
high-resolution color graphics 
and animation, sound effects 
to enhance the action, random 
events at all stages of the 
adventure, and embedded 
arcade-like action. 
Price: $40.00 

Includes one floppy disk. 
Author: Robert C. Clardy 
Available: 

Synergistic Software 

830 N. Riverside Drive 

Suite 201 

Renton, WA 98055 



Name: The Business 

Bookkeeping 
System^** 

System: Apple n, Apple 11 

Plus, Apple in 
Memory: 48K 
Language: Applesoft BASIC 
Hardware: Two disk drives, 
video monitor, 
printer, emulation 
mode (Apple HI) 
Description: The Business 
Bookkeeping System is a cash 
accounting system that in- 
cludes general ledger, cus- 
tomer activity, vendor activity, 
and employee activity. It con- 
tains eleven general ledger 
reports, five customer activity 
reports, four vendor activity 
reports, and six employeee ac- 
tivity reports. 
Price: $395.00 

Includes indexed 

documentation, ten 

diskettes, toll-free software 

support. 
Available: 

Dakin 5 — Authorized Apple 

dealer 



Name: Astro Blast 
System: TRS-80 Color 

Computer 
Memory: 16K/cassette 

32K/disk 
Language: Assembly 
Hardware: Joysticks 
Description: Astio Blast is a 
space "shoot-em-up" featuring 
the highest resolution 
graphics, lots of color, and 
dramatic sound effects. Wave 
after wave of alien attackers 
are a challenge to your joystick 
and fire-button skills. Three 
selectable skill levels coupled 
with automatic game accelera- 
tion challenge both novice and 
professional. 
Price: $24.95/cassette 

$29.95/disk 

Includes full instructions. 
Author: Ron Krebs 
Available: 

Mark Data Products 

23802 Barquilla 

Mission Viejo, CA 92691 



Name; INTROL-C/6809 
Compiler System 

System; FLEX, UniFLEX, 

OS-9, CP/M 
Memory; 56K 
Language; C 

Description: Powerful C lan- 
guage compiler develops pro- 
grams in C for systems run- 
ning under FLEX, UniFLEX, or 
OS-9; also as cross-software for 
CP/M-based development sys- 
tems. Full-blown implementa- 
tion provides full support of all 
standard C except initializers 
and bitfields. Written entirely 
in C itself, Introl-C includes a 
C compiler, 6809 assembler, 
linking loader, standard run- 
time library and library 
manager, and unsurpassed 
code efficiency. 
Price: From $400.00 

Includes diskette, user 

manual, one-year 

maintenance/update. 
Author: Richard D. Pennington 
Available: 

Introl Corp. 

647 W. Virginia St. 

Milwaukee, WI 53204 

(414) 276-2937 



Name; Frazzle 

System; Apple n or Apple 

n Plus 
Memory: 48K 
Language: 6502 Assembly 
Hardware; Disk Drive (Dual 

DOS 3.2/3.3) 
Description: Muse annoimces 
the release of Fiazzle, the com- 
puter game that puts you in 
the future. The scene begins in 
space, with you commanding a 
Frazzle Force Ship that is sud- 
denly under attack by Beasties. 
Colorful screen graphics show 
your position on the ship's 
radar screen, the force field 
surrounding you, and odd- 
shaped Beasties zooming in. 
Your ammunition is pulsating 
Energy Probes, which beep and 
flash as you release them on 
the screen. You must stop the 
Beasties while avoiding colli- 
sions with them, with the walls 
of the force field, and with 
your own ammunition. Sound 
effects include the electronic 
hum of a radar monitor and the 
squish of Energy Probes dis- 
solving the Beasties. 
Price: $24.95 
Author: J.C. Nolan 
Available; 
Direct from Muse and 
computer stores nationwide 



Name; K-Razy Kritters 

System: Atari 400/800 
Memory; 8K 
Language: Machine Code 
Hardware: ROM Cartridge 
Description: This challenging 
celestial adventure with ten 
levels of play begins with three 
command ships. The player's 
active command ship attempts 
to destroy free-falling alien 
patrol "Kritters" descending 
from above. Weapons include 
standard missiles and super- 
missiles. If a command ship is 
destroyed, a sanitation crew 
will remove the wreckage. 
Price: $39.95 suggested retail 

Includes ROM cartridge and 

instruction booklet. 
Author: Torre Meeder 
Available: 

K-Byte 

1705 Austin 

Troy, MI 48084 

or your local computer 

software dealer 



Name: 3D Drawing Board 

System: TRS-80 Color 

Computer 
Memory: 16K 
Language: BASIC 
Description: 3D Diawing 
Board is a tool for education, 
entertainment, or serious proj- 
ects. It helps you draw objects 
in three dimensions, rotates 
them, and changes elevation, 
size, and distance. The draw- 
ings can be saved to tape or 
disk for future use. 
Price: $24.95/cassette 

$29.95/disk 

Includes complete 

instruction manual and 

program with samples. 
Author: Mark Laessig 
Available; 

Computerware 

Box 668 

Encinitas, CA 92024 

(714) 436-3512 

Name: Computer- Aided 

Instruction for 
General Chemistry 

System: Apple, 

Commodore PET, 

TRS-80 ra 

Memory: 48K/Apple II 
Language: Applesoft/Apple II 
Hardware: Apple — DOS 3.3 
PET — 4040 or 
2031 disk drive 
Description; A comprehensive 
set of 20 programs designed to 
supplement a course in general 
chemistry. Each program con- 
tains 50-70 drills, exercises, 
and problems (approximately 
24 Vi hours of machine time) 
presented in an interactive for- 
mat. The questions are ran- 
domly generated. No computer 
experience is necessary. In- 
tended for introductory college 
level or advanced placement in 
high school. 
Price; $325.00 
Includes four disks for the 
Apple n, two disks for the 
PET, and four or five disks 
for the TRS-80, and 
complete documentation. 
Authors: William Butler 
Raymond Hough 
Available; 
John Wiley & Sons, Inc. 
Eastern Distribution Center 
Order Processing Dept. 
1 Wiley Drive 
Somerset, NJ 08873 



106 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 




Plus Sensational Limited-Time Savings 
On Ohio Scientific C1P Series personal 
computers, Superboard and C1 P 
accessories, spare replacement parts, 
printers, monitors, integrated circuits, 
and other computer-related components. 

To Order 

Call us directly or return order coupon with 
your check, money order, or Mastercard or 
Visa Account Number. Orders will normally be 
shipped within 48 hours after receipt. 
$100.00 minimum order. 

FREE 

Sampler Cassettes with each Superboard II and 
C1P series order! 

Taxi (Game), Electronic Equations, Loan Finance, Straight 
and Constant Depreciation, Uneven Cash Flows 

Tiger Tank, Flip Flop, (Logic Game), Hectic, Black Jack, 
Master Mind 



Super Sale! 



40% Off On Ohio Scientific Superboard II 
A Complete Computer System On A Board 

includes full-size 53-key keyboard, video and audio cassette 
interfaces; SWAP, Modem, sampler cassettes; manual; 8K 
BASIC-in-ROM, with 8K RAM. Requires 5-V/3 amp regulated 
DC power supply. 30-day limited warranty. Supply is limited. 
ONLY $200.00 



Cleveland Consumer Computers & Components 

1333 8. Chillicothe Road, Aurora, OH 44202 
TO ORDER: CALL 1-800-321-5805 TOLL FREE 
(Ohio Residents Call 216-562-4136) 



D SUPERBOARD II, $200.00 

D Send Detailed Catalog/Order Form 




Name . 



Address . 



state. 



City 

Payment by enclosed check or money order or charge to: 
D MasterCard Q VISA 

Account # Expiration Date 

Total Amount Charged or Enclosed $ 



-Zip„ 



Ohio Residents Add 5.5% Sales Tax. All Orders Will Be Shipped Insured By UPS Unless 
Requested Otherwise. 



comp case 



IS THE PERFECT GIFT FOR THE COMPUTER THAT HAS EVERYTHING 




Your investment in a computer is long term. You expect 
many years of reliable service. Comp Case protects 
your investment when not in use or while transporting it 
from office or home. Your computer never leaves the 
case — you simply remove the lid, make the electrical 
connection, and operate. Comp Cases are available for 
most bran(js of computers and peripherals. 



Comp Case is the perfect Christmas 
gift. Comp Cases are available in 
better computer stores in our area. 
Or call 800-848-7548 direct to 
receive your Comp Case in 
time for Christmas. 



COMPUTER CASE COMPANY • 5650 INDIAN MOUND COURT • COLUMBUS, OHIO 43213 



t^ 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



107 



MICftO 

Hardware Catalog 



Name: Joystick 
System: Apple II Plus 
Description: This joystick is a 
joy to use. Its heavier metal 
case doesn't slip or slide like 
plastic. And the very sensitive 
switch is guaranteed for 
1,000,000 pushes. Better con- 
trol and reliability. 
Price: $59.95 
Available: 

Datamost, Inc. 

9748 Cozycroft Avenue 

Chatsworth, CA9I3II 

(213J 709-1202 

or computer stores 

Name: Apple-Mate 
Hardware: Floppy disk drive 
Description: Add this floppy 
disk drive to your Apple com- 
puter. It is 100% compatible 
with the Apple Disk drive, 
and with all Apple software in- 
cluding half-track-protected 
software. 
Price: $335.00 

Includes cable. 
Available: 

Quentin Research, Inc. 

19355 Business Center Dr. 

Northridge, CA 91324 

(213) 701-1006 



Name: Freedom 100 

Description: This is an ASCII 
CRT terminal. It has a block 
mode, ten function keys, 15 
graphics characters with full 
attributes, one-page screen 
memory, and separate attri- 
butes buffer. 
Price: $595 
Available: 
Liberty Electronics, USA 
100 Clement Street 
San Francisco, CA 94118 



Name: Gimix Intelligent 

Serial I/O 
Piocessoi Boaid 

System: Gimix 6809 
Memory: 128K minimum 
Hardware: S-30 I/O bus 

board 
Description: This board re- 
duces the number of interrupts 
between user terminals and 
the host CPU by buffering data 
tjansfers between system and 
users and preprocessing of the 
data. It has on-board CPU and 
RAM/EPROM memory, three 



RS-232C serial ports, a Z8038 
FIO I/O interface, and sup- 
ports up to three users. It re- 
quires on-board software and 
OS drivers. 

Price: $438.11 

Includes 4K RAM. (Software 

is optional.) 
Available: 

Gimix Inc. 

1337 W. 37th PI. 

Chicago, IL 60609 

(312) 927-5510 



Name: The Spectrum 
Stick 

System: TRS-80 Color 

Computer 
Memory: 4K and up 
Hardware: Joystick 
Description: This new joystick 
has a hair-trigger firebutton 
and swivel-ball type compo- 
nent stick. The extra-long 
cable makes it easier to put 
your joystick where you want 
it. Red LED indicator reminds 
you to shut off the Color 
Computer. 

Price: $39.95 plus $2.00 S/H 
Includes 10-foot cable, red 
LED indicator, joystick, 
firebutton, case, and joystick 
control 
Available: 
Spectrum Projects 
93-15 86 Drive 
Woodhaven, NY 11421 
(212) 441-2807 Voice 
(212) 441-3755 Computer 



Name: Disk-O-Tier 

System: All disk-based 
systems 
5W" or 8" 
Description: A convenient 
desktop holder for diskettes 
that prevents damage by laying 
them flat, but allows full 
visibility of all diskettes. It is 
molded of durable NAS smoked 
plastic, and holds eleven 
diskettes. 
Price: $9.50 plus $2.00 

postage 

$19.00 for twin-pack, ppd. 
Available: 

ETS Center 

Dept. 97 

Box 651 

35026-A Turtle Trail 

Willoughby, OH 44094 

(216) 946-8479 



Name: Pro-Guard 8" 

Floppy Controller 

System: Apple III 
Memory: 2.2 megabytes 
Hardware: 8" Shugart- 

compatible drives 
Description: Pro-Guard 8" 
Floppy ContToUer adds up to 
2.2 megabytes of removable 
media and provides backup for 
Apple profile. IBM 3740 format 
allows 8" disks to be read on 
other computers, including 
IBM mainframes. 
Price: $695 

Includes DOS, SOS, Pascal, 

CP/M distribution software, 

cables, manual. 
Available: 

Apple Dealers 

MICRO-D 

SUA, Inc. 



Name: Programmable 

Sound Module 

System: TRS-80 Color 

Computer 
Memory: 4K and up 
Language: BASIC 
Description: The Piogiam- 
mable Sound Module is a plug- 
in cartridge for the Color Com- 
puter. A separate audio- 
microprocessor and ROM in- 
side the cartridge combine to 
extend BASIC'S vocabulary 
with a versatile sound-effects 
system. Complex noises can 
be created with short BASIC 
phrases and maintained in- 
dependently of your program, 
allowing simultaneous video 
and audio effects. 
Price: $139.95 

Includes PSM cartridge, 

operating system in ROM, 

and full instructions. 
Available: 

Maple Leaf Systems 

Box 2190 

Station "C" 

Downsview, Ontario 

Canada M2N 2S9 



Name: Voter 30 
System: Apple II 
Language: BASIC 
Description: Voter 30 is a 
peripheral hardware /software 
package for training, market- 
ing, and educational uses using 
a group response system for up 
to 30 participants. Each par- 



ticipant gets a hand-held 
keypad to respond to multiple- 
choice questions. Voter 3C 
tabulates the responses and 
produces a color bar chart 
showing the breakdown, while 
keeping a record of the in- 
dividual station responses. 
Price: $595 for interface card 

with programs and manual. 

$125.00 each for polling 

stations with cable and 

connectors. 
Available: 

Reactive Systems, Inc. 

40 North Van Brunt Street 

Englewood, NJ 07631 

(201) 568-0446 



Name: Mini-Video 

182-140 

System: 6502-based video 

board 
Memory: 4K RAM/ 

4K EPROM 
Language: Video Display,- 
Monitor & Tom 
Pittman's Tiny 
BASIC 
Hardware: Assembled circuit 

board 
Description: Add a videc 
display to your AIM or othe: 
computer. It will run Ton 
Pittman's Tiny BASIC witl 
the addition of the paralle 
keyboard, 5V power supply 
and video monitor. Thf 
2716-character generator wil 
produce 256 8x8 characters 
ASCII upper- and lower-case 
and graphic characters. Th( 
44-pin expansion connecto: 
can be used to add up to 6K o 
memory or extra I/O ports 
The cursor is flashing under 
line type. Power requirements 
5 volts, 600 MA, 3 watts. 
Price: $149.95 

Includes documentation and 

assembled board without 

EPROMs. 
Available: 

John Bell Engineering, Inc. 

1014 Center Street 

San Carlos, CA 94070 

(415) 592-8411 



iSMCftO 



108 



MICRO - The 6502/6809 Journal 



No. 54 - November 198; 



ATARI 400/800 



Atari 400 and 800 are color-and-sound computers. 6502 is the main processor and ANTIC handles video. 
Atari 400 has a membrane keyboard and Atari 800 has a full-size typewriter keyboard. 

Peripherals may include up to four disk-drive units, a cassette unit, printer, and the 850 interface module. 
Four programmable controller ports handle joysticks, paddles, light pens, and other accessories. 

Sophisticated graphic capabilities include: 256 colors (16 may be displayed on the screen at once), 17 
graphic modes (6 character and 11 map), high-resolution graphics (up to 320 x 192), and powerful 
player/missile graphics. 







Some Useful Memory Locations on the Atari 


Page Locations: 






Hex 


Dec 


Length 


Name 


Description 


0010 


016 


1 


PQKMSK 


(RQ mask 


0012 


018 


3 


RTCLOK 


Real time ctock 
018 is hi order 


0041 


065 




SOUNDR 


Noisy I/O flag 


0042 


066 




CRITIC 


Critical I/O flag 


004D 


077 




ATRACT 


Attract mode flag 


0052 


082 




LMAHGtN 


Left margin 


0053 


083 




RMARGIN 


Right margin 


■ 008Q 


128 


2 * 


LOMEM 


Buffer used to token ize line of BASIC 


0082 


130 


2" 


VNTP 


Variable name table start 


0084 


132 


2 * 


VNTD 


Variable name table dummy end 


0086 


134 


2 ' 


VVTP 


Variable value table start 


OOOT 


136 


2* 


STMTAB 


Statement table 


008A 


138 


2* 


STMCUfl 


Current statement pointer 


008C 


140 


2 * 


STARP 


String and array area 


008E 


142 


2* 


RUNSTK 


BASIC'S software stack 


0090 


144 


2* 


MEMTOP 


Top of memory used by BASIC program 


OOBA 


186 


2 


STOPLN 


Line number of most recent stop or error 


00C3 


195 


1 


ERRSAV 


Error number causing TRAP branch 


OOCB 


203 


7 


Available for 


user machine-language programs 


OODO 


21.2 


2 


Value return 


from machine language to BASIC 


* Indicates (ocation is a vector 





I 



ANTIC Commands (Display List) 

Banf'ffne commands: 
^Command is {# lines -H)* 16 
pEx.: Blank 8 lines is (8-1- 1}* 16, or $70 = dec. 144 

Jump instruction: S01 = dec. 1 (2-byte instruction) 

Jump on vertical blank = $41 = dec. 65 {2-byte instruction) 

Display line instruction is equal to the IR mode number 
p02-$0f^. 
'to set special features, add these values to the instructions: 

Add 

Hex Dec. For 

10 16 Horizontal scroll enable 

20 32 Vertical scroll enable 

40 64 Load memory scan (makes it a 2-byte 

instruction) 
,80 128 Display list interrupt enable 

"Note: Display list interrupt can be enabled on any command, 
but scrolling and load memory scan can be enabled only on 
digplay conimarids. . , ,-.. -_ .. -.-,,. :_■■ ^^ ^ 



ANTIC Commands (Display Modes) 



1 


^v 




Scan 






■ 


?^ ■" 




Lines 






^ 


bde 


Horlz. 


Per Mods 




Char/Map 


m 


BASIC 


Pixels 


Line 


Coion 


Mods 


02 





40 


8 


1.5 


C 


03 




40 


10 


1.5 


C 


04 




40 


8 


5 


C 


05 




40 


16 


5 


C 


06 


1 


20 


8 


5 


C 


07 


2 


20 


16 


5 


C 


08 


3 


40 


8 


4 


M 


09 


4 


80 


4 


2 


U 


OA 


5 


80 


4 


4 


M 


OB 


6 


160 


2 


2 


M 


OC 




160 


1 


2 


M 


OD 


7 


160 


2 


4 


M 


OE 




160 


1 


4 


M . 


OF 


8 


320 


1 


1.5 


U 



IGTIA: ^_.. __,_.. 

The GTfA modes are versions of mode 8, instituted 
by adding 64, 128, or 192 to PRIOR. 




Description 

16 luminances of background hue 
9 cofofs - uses $D012 through SDOIA^ 
16 hues of background luminance '-^i 



iSMCRO" Data Sheet #10 



Compiled by Paul Swanson 



ATARI 400/800 



00 *r. 



^ CB 



COLOR VALUES: 
Black-gray-white 



Burnt Orange 

Orange 

Red-orange 

Red 

Purple 

Blue-purple 

Blue 

8 Blue 

9 Gray-blue 

10 Turquoise 

1 1 Aqua 

12 Green 

13 Yellow-green 

14 Orange-green 

15 Orange 



Default colors (SETCOLOR values): Joysticks: 

0,2,8 (Orange) 

1,12,10 (Light green) 

2,9,4 (Dark blue) 

3,4,6 (red) 

4,0,0 (Black) 



11 



For COLORS: 

POKE hue* 16 -I- luminance into COLx 

For SOUND: 

POKE frequency into AUDFx 

POKE distortion* 16 -I- volume into AUDCx 




Hardware Registers and Shadows 



Address 


Shadow 




(R)ead 


or 


Hsx Dec 


Hex 


Dec 


Name 


Description (W](ite 


COLORS: 












D012 53266 


02C0 


704 


COLPMO 


Playsr-missile 


W 


D013 53267 


02C1 


705 


C0LPM1 


Player-missile 1 


W 


D014 53268 


02C2 


706 


C0LPM2 


Player-misstfe a 


w 


D01S 53269 


02C3 


707 


C0LPM3 


Player- missile 3 


w 


D016 53270 


0204 


708 


COLPFO 


PlaytieldO 


w 


D017 53271 


0205 


709 


C0LPF1 


Playfield 1 


w 


0018 53272 


02C6 


710 


C0LPF2 


Playfield2 


w 


D019 63273 


0207 


711 


C0LPF3 


Playfield 3 


w 


D01A 53274 


02C8 


712 


COLBK 


Playfield background 


w 


SOUND: 












D200 53760 






AUDF1 


Channel 1 Frequency 


w 


O201 53761 






AU0C1 


Channel 1 Coritrol 


w 


D202 53762 






AU0F2 


Channel 2 Frequency 


w 


D203 53763 






AU0C2 


Channel 2 Control 


w 


0204 53764 






AU0F3 


Channel 3 Frequency 


w 


0205 53765 






AU0C3 


Channel 3 Control 


w 


D206 53766 






AU0F4 


Channel 4 Frequency 


w 


D207 53767 






AU0C4 


Channel 4 Control 


w 


D208 53768 






AUOCTL 


Audio Control 


w 


PLAYEF1S AND MISSILES 








DOOQ 53248 






HPOSPO 


Horiz.pos. Player 


w 


D001 53249 






HP0SP1 


Horlz. pes. Player 1 


w 


D002 53250 






HP0SP2 


Horiz.pos. Player 2 


w 


0003 53251 






HP0SP3 


Horiz. pos. Ptayer 3 


w 


0004 53252 






HPOSMO 


Horlz. pos. Missile 


w 


0005 53253 






HPOSM1 


Horlz. pos. Missile 1 


w 


D006 53254 






HP0SM2 


Horiz. pos. Missile 2 


w 


0007 53255 






HP0SM3 


Horiz. pos. Missile 3 


w 


D008 53256 






SIZEPO 


Size of Player 


w 


0009 53257 






SIZEP1 


Size of Player 1 


w 


OOOA 53258 






SIZEP2 


Size of Player 2 


w 


DOOB 53259 






SI2EP3 


Size of Player 3 


w 


OOOC 53260 






SIZEM 


Size of all Missiles 


w 


0407 54279 






PMBASE 


Ptayer-mlssile base 


w 


CHARACTERS: 










0401 54273 


02F3 


755 


CHACTL 


Cnaracter control 


w 


0404 54276 






HSCROL 


Horizontal scroll 


w 


D405 54277 






VSCROL 


Vertical scroll 


w 


0409 54281 


02F4 


756 


CHBAS 


Character set base 


w 


CONTROL REGISTERS: 








DO IB 53275 


026F 


623 


PRIOR 


Priority Select 


w 


D01D 53277 






GRACTL 


Graphics control 


w 


D20E 53774 


0010 


016 


IRQEN 


IRQ enable 


w 


0402 54274 


0230 


559 


OLISTL 


Display list ptr., low 


w 


0403 54275 


0231 


560 


DLISTH 


Display list ptr., high 


w 


D40E 54286 






NMIEN 


Non-maskabfe int. enab 


.w 



Address 


Shadow 




(R)ead 


or 


Hex Dec 


Hex 


Dec 


Name 


Description (W)rlte 


» 


GAME CONTROLLER PORTS: 






D010 53264 


0284 


644 


TRIGO 


Joystick trigger 


R 


D011 53265 


0285 


645 


TRIG1 


Joystick trigger 1 


R 


0012 53266 


0286 


646 


TRIG2 


Joystick trigger 2 


R 


0013 53267 


0287 


647 


TRIG3 


Joystick trigger 3 


R 


D200 53760 


0270 


624 


POTO 


Paddte 


R 


0201 53761 


0271 


625 


P0T1 


Paddle 1 


R 


0202 53762 


0272 


626 


P0T2 


Paddle 2 


R 


0203 53763 


0273 


627 


P0T3 


Paddle 3 


R 


0204 53764 


0274 


628 


POT4 


Paddle 4 


R 


O205 53765 


0275 


629 


POTS 


Paddle 5 


R 


0206 53766 


0276 


630 


P0T6 


Paddle 6 


^ 1 


0207 53767 


0277 


631 


P0T7 


Paddle 7 


R ' 


0208 53768 






ALLPOT 


Pot port state 


R 


0208 53771 






POTGO 


Start pot scan 


W 


0300 54016 


0278 


632 


PORTA 


STICKO 


H 




0279 


633 


PORTA 


STICK1 


R 


0300 54016 






PORTA 


Direction register 


W 


D301 54017 


0280 


634 


PORTB 


STICK2 


R 




0281 


635 


PORTS 


STICK3 


R 


0301 54017 






PORTB 


Direction register 


W: 


0302 54018 






PACTL 


Port A control 


W 


0303 54019 






PBCTL 


Port B control 


W 


MISCELLANEOUS: 










D01F 53279 






CONSOL 


Consol switches 


R 


001 F 53279 






CONSOL 


Keyboard speaker 


W 


D20A 53770 






RANOOW 


random number gen. 


R 


D20F 53775 


0232 


562 


SKCTL 


Serial port control 


Wi 


040B 54283 






VCOUNT 


Vertical line counter 


R 


D40C 54284 


0234 


564 


PENH 


Light pen horiz. aos. 


R. 


0400 54285 


0235 


565 


PENV 


Light pert vert POS. H^ 



Collision Registers for Players and Missiles 



0000 


53248 


MOPF 


Missile 


■ playfield 


R 


0001 


53249 


1^1 PF 


Missile 1 


■ playfield 


R 


0002 


53250 


KA2PF 


Missile 2 


• playfield 


R 


O003 


53251 


M3PF 


Missile 3 


- playfield 


R 


O00'4 


53252 


POPF 


Player - 


playfield 


R 


O0O5 


53253 


PIPF 


Player i - 


playfield 


R 


D006 


53254 


P2PF 


Player 2 ■ 


playfield 


R 


0007 


53255 


P3PF 


Player 3 ■ 


playfiekJ 


R 


0008 


53256 


MOPL 


Missile 


- player 


R 


O009 


53257 


M1PL 


Missile 1 


- player 


R 


OOOA 


53258 


M2PL 


Missile 2 


- player 


R 


OOOB 


53259 


l^3PL 


Missile 3 


• player 


R 


OOOC 


53260 


POPL 


Player ■ 


player 


R 


OOOD 


53261 


P1PL 


Player 1 ■ 


player 


R 


OOOE 


53262 


P2PL 


Player 2 - 


player 


R 


DOOF 


53263 


P3PL 


Player 3 - 


player 


R 



iMCRO" Data Sheet #10 



NATIONAL 

ADVERTISING 

REPRESENTATIVES 



WEST COAST 

The R.W. Walker Co., Inc. 
2716 Ocean Park Boulevard 
Suite 1010 

Santa Monica, California 90405 
(213) 450-9001 

serving: Washington, Oregon, Idaho, Montana, Wyom- 
ing, Colorado, New Mexico, Arizona, Utah, Nevada, 
California, Alaska, and Hawaii (also British Columbia 
and Alberta, Canada). 



MIDDLE ATLANTIC AND 
SOUTHEASTERN STATES 



Dick Busch Inc. 
Richard V. Busch 

6 Douglass Dr., R.D. #4 
Princeton, NJ 08540 
(201) 329-2424 



Eleanor M. Angone 

74 Brookline 

E.Atlantic Beach, NY 11561 

(516) 432-1955 



serving: New York, Pennsylvania, New Jersey, Dela- 
ware, Maryland, West Virginia, Virginia, D.C., North 
Carolina, South Carolina, Louisianna, Tennessee, Mis- 
sissippi, Alabama, Georgia, and Florida. 



NEW ENGLAND AND 
ALL OTHER TERRITORIES 

Kevin B. Rushaiko 

Peterboro, New Hampshire 03458 
(603) 547-2970 

serving: Maine, New Hampshire, Vermont, Massachu- 
setts, Rhode Island, Connecticut, Ohio, Kentucky, Okla- 
homa, Arkansas, and Texas (also any other territories 
not listed above). 



ADVERTISING MANAGER 

Cathi Bland 
address materials directly to: 
MICRO INK, Advertising 
34 Chelmsford Street 
Chelmsford, Massachusetts 01824 
(617)256-5515 



Advertiser's Index 



Aardvark Technical Services, Ltd 18 

ABM Products • 98 

Advanced Operating Systems 17 

Anthro-Digital Software 8 

Apex Co 84 

Apple Tree Electronics 2,9 

Ark Computing 47 

Artsci, Inc IPC 

Aurora Software Associates 21 

Bedford Micro Systems 8 

CGRS Microtech 24 

Cleveland Consumer Computer Components 107 

Collegiate Microcomputer 77 

Computech 15 

Computer Case Co 107 

Computer Mail Order 64-65 

Computer Marketing Service 78 

Computer Science Engineering 104 

Datamost 33, 34, 90, 92 

Decision Systems 101 

Digicom Engineering, Inc 68 

Digital Acoustics 12 

D&N Micro Products, Inc 69 

Eastern House Software 61 

Excert, Inc : 48 

Execom Corp 101 

Genesis Information Systems Inc 39 

Gimix, Inc 1 

Hudson Digital Electronics Inc 40 

Interesting Software 73 

Kilo Corp -54 

Leading Edge Electronics BC 

Logical Devices 95 

Lyco Corp 58 

MICRObits (Classifieds) 28, 30, 31 

MICRO INK 32, 82, 84 

Micro Motion 68 

Microsoft Consumer Products IBC 

Micro-Ware Distrihuting Inc 102 

M.M.S 76 

Modular Systems 77 

Olympic Sales Co 21 

Optimal Technology 95 

Orion Software 6 

PEEK(65) 73 

Perry Peripherals 39 

Pretzelland 37 

Pterodactyl Software 102 

Quentin Research 52 

R C Electronics 71 

Sensible Software 89 

SGC : 25 

6502 Program Exchange 85 

Skyles Electric Works 74 

Softel ,. 100 

Softronics 4 

Software Farm. 91 

Spectrum Systems 98 

Star Micronics 26 

Tau Lambda 15 

Universal Data Research 104 

Versa Computing, Inc 22 

Victory Software 1 1 

Voicetek, Inc 63 

John Wiley & Sons 2 

XPS, Inc 104 

MICRO INK is not responsible for claims made by its advertisers Any 
complaint should be submitted directly to the adyertisei. Please also send 
written notification to MICRO. 



No. 54 - November 1982 



MICRO - The 6502/6809 Journal 



111 



Next Month in MICRO 



Commodore Feature 

• SuperPET's Waterloo ASCII Character Set — A 

description of the ASCII ciiaracter set used in the 
Waterloo interpreters supplied with the SuperPET, 

• BASIC Squeeze — A routine to squeeze out 
imbedded blanks, line separators, and comments 
for a BASIC program. 

• Microcomputers in the Chemical Engineering 
Curriculum, Part 2 — Analog transducers in a 
digital world. 

• Add a BASIC Line Delete Command — A 

BASIC line delete command allows the user to 
delete blocks of BASIC program lines at the touch 
of a single key. The article shows how to 
implement this command, in machine language, 
on Commodore computers, including the VIC-20. 

• SOUP — An efficient compare program for 
machine-language program files on Commodore 
disk: Uses BASIC 4.0 disk commands, but is 
otherwise compatible with other Microsoft 
BASICS. 



• It's All Relative — CBM Disk Techniques, Part 

1 — An explanation of how to get the most from 
CBM's powerful disk operating system. Examples 
are drawn from a well-written mailing list 
package. 

• VIC Jitter Fixer — Add this routine to your 
programs to help get reliable readings from your 
VIC paddle, joystick, and light pen registers. 

And more... 

BASIC Macro Function for Cursor Control 

on the OSI 
Applesoft GOTO/GOSUB Checking Routine 
Logic Instructions of the 68000 
Atari Graphics 



New Columns! 

CoCo Bits — for the Color Computer 
From Here to Atari returns 



20% OFF 



Your money goes farther when you sub- 
scribe. During the course of a year, when you 
subscribe, you save 20% (in the U.S.). 

Pay only $24.00 ($2.00 a copy) for 12 monthly 
issues of MICRO sent directly to your home or 
office in the U.S. 



More MICRO for Less Money 
When You Subscribe 

But on the newsstand — if you can locate the 
issue you want — you pay $30.00 a year ($2.50 
a copy). 

Special Offer — Subscribe for 2 years ($42.00) 
and get 30% off the single issue price. 

Subscribe to MICRO today. 



MICRO 

34 Chelmsford Street 
P.O. Box 6502 
Chelmsford, MA 01824 

Please send me MICRO for 1 year 2 years 

NOTE: Airmail subscriptions accepted for 1 year only. 



Subscription Rates Effective January 1, 1982 
Country Rate 



Check enclosed $_ 
Charge my 

No 



. VISA account 

. Mastercard account 



United States 

Foreign surface mail 

Europe (air) 

Mexico, Central America, Mid East, 

N. & C. Africa 
South Am., S. Afr., Far East, 

Australasia, New Zealand 



$24.00 1 yr. 
42.00 2 yr. 
27.00 
42.00 

48.00 

72.00 



Expiration date . 
Name 



* Airmail subscriptions accepted for only 1 year. 
For U.S. and Canadian 2-year rates, multiply by 2. 



Address 



City/State. 



-Zip 



JobTttre: 



Type of Business/Industry: . 



112 



MICRO - The 6502/6809 Journal 



No. 54 - November 1982 



^i«5-?.i»f; "^^V, AMMM 



..^IMAt: 



Jsi»S»<»*»« 



C3('i..., 



• •••••§•., 




Turn your Apple into the world's 
most versatile personal computer. 



The SoftCard™ Solution. SoftCard 
turns your Apple into two computers. 
A Z-80 and a 6502. By adding a Z-80 
microprocessor and CP/M to your 
Apple, SoftCard turns your Apple into 
a CP/M based machine. That means 
you can access the single largest body 
of microcomputer software in exist- 
ence. Two computers in one. And, the 
advantages of both. 

Plug and go. The SoftCard system 
starts with a Z-80 based circuit card. 
Just plug it into any slot (except 0) of 
your Apple. No modifications required. 
SoftCard supports most of your Apple 
peripherals, and, in 6502-mode, your 
Apple is still your Apple. 

CP/M for your Apple. You get CP/M 
on disk with the SoftCard package. It's 
a powerful and simple-to-use operating 
system. It supports more software 
than any other microcomputer operat- 
ing system. And that's the key to the 
versatility of the SoftCard/Appie. 



BASIC Included. A powerful tool, 
BASIC-80 IS included in the SoftCard 
package. Running under CP/M, ANSI 
Standard BASIC-BO is the most 
powerful microcomputer BASIC 
available. It includes extensive disk I/O 
statements, error trapping, integer 
variables, 16-digit precision, exten- 
sive EDIT commands and string func- 
tions, high and low-res Apple graphics, 
PRINT USING, CHAIN and COM- 
MON, plus many additional com- 
mands. And, it's a BASIC you can 
compile with Microsoft's BASIC 
Compiler 

More languages. With SoftCard and 
CP/M, you can add Microsoft's ANSI 
Standard COBOL, and FORTRAN, or 



Basic Compiler and Assembly Lan- 
guage Development System. Ail, more 
powerful tools for your Apple. 
Seeing is believing. See the SoftCard 
in operation at your Microsoft or Apple 
dealer. We think you'll agree that the 
SoftCard turns your Apple into the 
world's most versatile personal 
computer. 

Complete information? It's at your 
dealer's now. On we'll send it to you 
and include a dealer list. Write us. Call 
us. 



SoftCard is a trademark of Microsoft Apple 11 and 
Apple 11 Plus are registered trademarks of Apple 
Computer. Z-80 is a registered trademark of Zilog, 
Inc. CP/M IS a registered trademark of Digita 
Researcfi, Inc. 



r CONSUMER^ PRODUCTS^ 

MICROSOFT Inc. 
10700 Northup Way • Bellevue, WA 98004 



THE PR0WRIIERGOMEIH 





(And It Cometh On Like GangbustersJ 

Evolution. 

It's inevitable. An eternal 
verity. 

Just when you think you've 
got it knocked, and you're 
resting on your laurels, some- 
body comes along and makes 
a dinosaur out of you. 

Witness what happened to 
the Centronics printer when 
the Epson MX-80 came along 
in 1981. 

And now, witness what's 
happening to the MX-80 as 
the ProWriter cometh to be 
the foremost printer of the 
decade. 
SPEED 

MX-80: 80 cps, for 46 full lines 
per minute throughput. 
PROWRITER: 120 cps, for 
63 full lines per minute 
throughput. 
GRAPHICS 
MX-80; Block graphics 
standard, fine for things like 
bar graphs. 

PROWRITER: High-resolu- 
tion graphics features, fine 
for bar graphs, smooth curves, 
thin lines, intricate details, etc. 
PRINTING 

MX-80: Dot matrix business 
quality. 

PROWRITER: Dot matrix 
correspondence quality, with 
incremental printing capability 
standard. 
FEED 

MX-80: Tractor feed standard; 
optional friction-feed kit for 
about $75 extra. 
PROWRITER: Both tractor 
and friction feed standard. 
INTERFACE 
MX-80: Parallel interface 
standard; optional serial 
interface for about $75 extra. 
PROWRITER: Parallel and 
serial interface standard. 
WARRANTY 

MX-80: 90 days, from Epson. 
PROWRITER: One full year, 
from Leading Edge. 
PRICE 
Heh. heh. 

Distributed Exclusively by Leading 
Edge Products, Inc., 225 Turnpike - 
Street, Canton, Massachusetts 
02021. Call: toll-free 1-800-343-6833: 
or in Massachusetts call collect 
1617)828-8150 Telex 951-624. 

LEADIKG 
EDGE. 

For a free poster of 'Ace " 
fProwriter's pilot/ doing his thing, 
please write us.